[PLUG] Command line and paths
Rich Shepard
rshepard at appl-ecosys.com
Wed Jan 30 14:34:00 UTC 2008
On Wed, 30 Jan 2008, John Jason Jordan wrote:
> 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?
To keep the shell doing what you want, consider creating a subdirectory in
your home directory called, for example, shell-scripts. In this directory
write a three-line script for your java apps and others you want to invoke
from an icon or menu. Make the script executable (e.g., 'chmod 755
treeform.sh'), then call the script from your icon.
The treeform.sh script would look like this:
cd Software/TreeForm102
java -jar TreeForm.jar
cd
When run, the PWD will change to the Software/TreeForm102 directory, then
invoke the java application from within that directory. When you exit, the
PWD returns to your home directory.
Rich
--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the PLUG
mailing list