John Jason Jordan | 28 Nov 03:38
Picon
Favicon

Alacarte command help

Fedora 12, Gnome 2.28.0

I have an application that I need for drawing syntax trees in
linguistics. It is a java application and the command is:

java -Xmx256m -Xms64m -jar TreeForm.jar

The TreeForm.jar archive resides in /home/jjj/Software. If I use the
command line and change directory to /home/jjj/Software, then execute
the command, the program launches and all of the buttons on its menu
appear. If I launch it from someplace else and use the command:

java -Xmx256m -Xms64m -jar /home/jjj/Software/TreeForm.jar

The buttons do not appear. 

The TreeForm folder contains a subfolder containing images of the
buttons. For some reason the application finds the folder when it is
launched from the command line inside the /home/jjj/Software/TreeForm
folder, but not if it is called from outside that folder. 

This is very strange, but it doesn't matter to me as long as I get the
buttons. 

I opened Alacarte to create a launch item. It launches, but without the
buttons. The command I started with was:

java -Xmx256m -Xms64m -jar /home/jjj/Software/TreeForm.jar

In an attempt to fix the problem, I changed the command to:

cd /home/jjj/Software | java -Xmx256m -Xms64m -jar TreeForm.jar

However, this gives me an error message 'failed to execute child
process "cd" (No such file or directory).'

I'm trying to get the launch menu command to change to the directory
first, then launch the .jar archive. Apparently I haven't got the
syntax quite right. Clicking on the Help button in Alacarte gives me
'The requested URI "ghelp:user-guide#menu-editor" is invalid.'

Can anyone help?
Ravi Kumar | 28 Nov 11:46
Picon
Gravatar

Re: Alacarte command help



On Sat, Nov 28, 2009 at 8:08 AM, John Jason Jordan <johnxj <at> comcast.net> wrote:
Fedora 12, Gnome 2.28.0

I have an application that I need for drawing syntax trees in
linguistics. It is a java application and the command is:

java -Xmx256m -Xms64m -jar TreeForm.jar

The TreeForm.jar archive resides in /home/jjj/Software. If I use the
command line and change directory to /home/jjj/Software, then execute
the command, the program launches and all of the buttons on its menu
appear. If I launch it from someplace else and use the command:

java -Xmx256m -Xms64m -jar /home/jjj/Software/TreeForm.jar

The buttons do not appear.

The TreeForm folder contains a subfolder containing images of the
buttons. For some reason the application finds the folder when it is
launched from the command line inside the /home/jjj/Software/TreeForm
folder, but not if it is called from outside that folder.

This is very strange, but it doesn't matter to me as long as I get the
buttons.

I opened Alacarte to create a launch item. It launches, but without the
buttons. The command I started with was:

java -Xmx256m -Xms64m -jar /home/jjj/Software/TreeForm.jar

In an attempt to fix the problem, I changed the command to:

cd /home/jjj/Software | java -Xmx256m -Xms64m -jar TreeForm.jar

Read more about the pipe (|) in Linux/Unix here - http://en.wikipedia.org/wiki/Pipeline_(Unix)

Pipes are not what you want to use.
You should write a shell script for launch. Lets say file Treeform.sh
The  content would be :
#!/bin/bash

APP_HOME=/home/jjj/Software/

cd $APP_HOME
java -Xmx256m -Xms64m -jar TreeForm.jar

#-- END --

This way your application would have working directory of what you set and it would find images subdir in it.


--
-=Ravi=-
_______________________________________________
gnome-list mailing list
gnome-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-list

Gmane