Re: Alacarte command help





On Sat, Nov 28, 2009 at 8:08 AM, John Jason Jordan <johnxj 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=-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]