[PLUG] Command line and paths

John Jason Jordan johnxj at comcast.net
Wed Jan 30 08:00:42 UTC 2008


This has me shaking my head. Hopefully someone can explain what is going on.

I have a Java application that I run on Ubuntu Gutsy x86_64 using Sun Java 1.5. Actually I have several Javas installed, but that is the one that is set as the default, and the application won't run without it being the default. Luckily no other application cares, so all is well.

The problem is that the application has a number of buttons which are displayed with the use of icon files. The icon files are all in the correct folder, but the icons have never displayed. All I get is a little white box where the button is supposed to be. There are also popups explaining what the boxes are, so it is not critical that I have the buttons, but it would be nice to have them.

This evening I got an e-mail from the developer saying that he had figured out that to get the icons to appear you have to launch it from the command line while being in the folder where the .jar file is located. Thus, I need to:

cd ~/Software/TreeForm102
java -jar TreeForm.jar

This works great. The application launches and the buttons appear. 

But it's a lot easier to launch it from the Gnome panel application launcher. I had a launcher for it previously (which did not display the buttons), so I edited it so that the command line is "/home/jjj/Software/TreeForm102/java -jar TreeForm.jar." But after doing so it still launches without the buttons.

So then I went back to the command line and changed to my home folder. Then I entered the same command, but including the path in the command. It launches without the buttons. To clarify:

This command launches it with the buttons:
jjj at Devil7:~/Software/TreeForm102$ java -jar TreeForm.jar

If I change to ~/ and launch it with this command it launches without the buttons:
jjj at Devil7:~java -jar /home/jjj/Software/TreeForm102/TreeForm.jar

Why should it make a difference if I am in the folder or if I specify the folder by stating the full path?



More information about the PLUG mailing list