Login  Register

Re: Linux download

Posted by Albert Cardona on Sep 12, 2008; 11:16am
URL: http://imagej.273.s1.nabble.com/Linux-download-tp3695105p3695113.html

> In the meantime I discovered a little problem in run script on unix-like
> systems. The script looks like this:
> java -Xmx512m -jar ij.jar
>
> It works only if it is executed from ImageJ directory, and it is harder
> to run ImageJ from graphical menu using a launcher (as described in
> installation instruction
> http://rsbweb.nih.gov/ij/docs/install/linux.html#launcher).
>
> Maybe the generic run script could be modified to something like this,
> to locate the jar file automatically:
>
> #!/bin/sh
> SCRIPT_DIR=`dirname $0`
> java -Xmx512m -jar $SCRIPT_DIR/ij.jar
>
> To simplify running / creating laucher (it will not require any text
> console activity)?
>  


The above is *wrong*, because it won't set the working directory to the
directory where the plugins are. So no plugins will be found. You should
add a -Dplugins.dir=/blablabla entry, or symply 'cd' to that directory
before launching the JVM.

Try this instead:

#!/bin/sh
cd `dirname $0`
java -Xmx512m -jar ij.jar



Albert

--
Albert Cardona
http://www.mcdb.ucla.edu/Research/Hartenstein/acardona