PDA

View Full Version : Create Launcher/Script for Java App??



featherking
August 5th, 2006, 09:49 PM
I need to run this command


java -cp jts.jar:jcommon-1.0.0.jar:jfreechart-1.0.0.jar:jhall.jar:other.jar:rss.jar -Xmx256M jclient.LoginFrame .

But from this directory /home/chris/IBJts or ~/IBJts. If i try to create a launcher with
~/IBJts/java -cp jts.jar:jcommon-1.0.0.jar:jfreechart-1.0.0.jar:jhall.jar:other.jar:rss.jar -Xmx256M jclient.LoginFrame . It gives me an error.

Is there a certain way i can create a launcher to run this command? I had also thought of a script that could go to the directory and then run the command from there but i wouldnt know where to begin to write that

Any ideas?

ToniWiki
April 3rd, 2007, 08:20 PM
Try this:

(I suppose that jar files are in /home/chris/IBJts)

1.- Create a script like this:



#!/bin/sh
cd /home/chris/IBJts
java -cp jts.jar:jcommon-1.0.0.jar:jfreechart-1.0.0.jar:jhall.jar:other.jar:rss.jar -Xmx256M jclient.LoginFrame .


2.- Create a launcher to the previous script in Desktop or where you want.

It worked for me. :)

hogsmate
April 26th, 2010, 10:47 AM
Thanks ToniWiki that helped me a lot :) :popcorn: