Starting java app from desktop icon
cave.dnb at tiscali.fr
Mon Nov 13 20:48:14 GMT 2006
On Monday 13 November 2006 20:25, Kevin Krammer wrote:
> On Monday 13 November 2006 19:39, Nigel Henry wrote:
> > I have a Java app, "Breakage" a drum sequencer. To start it in Konsole,
> > first I have to cd to Breakage-22b, which is the folder in /home/user
> > containing the .jar file for the drum sequencer. So the procedure is.
> > $ cd Breakage-22b
> > Breakage-22b $ /usr/local/java/bin/java -jar Breakage2.jar
> > This starts the java app ok, but is there a way to run this from a link
> > to application on the desktop?
> > It appears that cd'ing to the directory containing the .jar file is
> > necessary before running the command /usr/local/java/bin/java -jar
> > Breakage2.jar
> When you create a "link to program" through the desktop's context menu,
> there is an option to set the application's working directory.
> Try setting it to /home/user/Breakage-22b or whatever the correct directory
> If this doesn't work, you can create a small starter script and use it as
> the program instead. The script should look like this
> cd /home/user/Breakage-22b
> /usr/local/bin/java -jar Breakage2.jar
> It needs to be executable (executable flag set), but since you can specify
> the full path when creating the link you can put it anywhere.
Hi Kevin. Breakage is only on FC2 at the moment, using KDE-3.2.2-14.FC2.legacy
Red Hat, and that "work path" option isn't there, but I just fired up Kubuntu
on the same machine. Kdebase is 4:3.4.3-0ubunt, and the work path is there.
I'd often wondered what this work path line was for. Now I know.
Regarding the shell scripts. I've never really known where to put them. I have
a couple in KDE's autostart. One for running sfxload and autoloading a
soundfont, and the other for running df, and printing out an Xmessage when
the the disk is approaching the redline.
So for example. I could create a directory named "Scripts" in /home/user, then
put my script for Breakage, named something like Breakage.sh in it, and just
access the shell script from the "link to application" setup, on the desktop
I'll try the shell script method on FC2, for my only Java app.
Many thanks for your help.
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
More info: http://www.kde.org/faq.html.
More information about the kde