Andreas,

I have made some changes in the attached file that will allow users to customize the settings by creating a ~/.jump/openjump.profile where they can add additional JAVA_OPTS and generally change settings.

The script also uses basename on the command so you don't have to deal with setting JUMP_HOME as it gets it for you (this is different from the wrapper script I created in the desktop email)

Paul

Andreas Schmitz wrote:
Paul Austin wrote:

Hi,

Please post a copy of your script so that we can review it.

here you go:

#!/bin/sh
# To make this script executable, use chmod a+x JUMPWorkbench-unix.sh

# You may need to uncomment the next three lines on some linux systems (Fedora?)

# JUMPHOME=/usr/local/jump/bin
# JAVA_HOME=/usr/java/jre1.5.0_04/bin
# cd $JUMPHOME
# The next lines are required in any case
LIB=../lib

CLASSPATH=$LIB/ext

if(test -f log4j.xml) then
  LOG4J=./log4j.xml
else
  LOG4J=../etc/log4j.xml
fi

for file in $LIB/*jar $LIB/batik/*jar ../build/*jar
do
  CLASSPATH=$CLASSPATH:$file
done

$JAVA_HOME/bin/java -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel 
-Dlog4j.configuration=file:../etc/log4j.xml -Xms256M -Xmx256M -cp $CLASSPATH 
com.vividsolutions.jump.workbench.JUMPWorkbench -properties 
workbench-properties.xml -plug-in-directory $LIB/ext

Best regards, Andreas

#!/bin/sh

JAVA_OPTS=-Xmx256M
MAIN=com.vividsolutions.jump.workbench.JUMPWorkbench
SAXDRIVER=org.apache.xerces.parsers.SAXParser 
JAVA=`which java`;
JUMP_HOME=`basename $0/..`
JUMP_LIB=$OPENJUMP_HOME/lib
JUMP_PLUGIN_DIR=${JUMP_PLUGIN_DIR:=$JUMP_LIB/ext}
JUMP_PROPERTIES=~/.jump/workbench-properties.xml

# allow a user to override any properties
JUMP_PROFILE=~/.jump/openjump.profile
if [ -f "$JUMP_PROFILE" ]; then
  source $JUMP_PROFILE
fi


if [ -z "$JUMP_PROPERTIES" -o ! -f $JUMP_PROPERTIES ]; then
  JUMP_PROPERTIES=$OPENJUMP_HOME/bin/workbench-properties.xml
fi

for libfile in $JUMP_LIB/*.jar $JUMP_LIB/*.zip $JUMP_LIB/batik/*.jar
do
  CLASSPATH=$libfile:$CLASSPATH;
done
CLASSPATH=$OPENJUMP_HOME/conf:$CLASSPATH
export CLASSPATH;
echo $CLASSPATH

JUMP_OPTS="-plug-in-directory $JUMP_PLUGIN_DIR"
if [ -f "$JUMP_PROPERTIES" ]; then
  JUMP_OPTS=$JUMP_OPTS -properties $JUMP_PROPERTIES
fi

$JAVA -cp $CLASSPATH:$JUMP_HOME/bin $JAVA_OPTS -Dorg.xml.sax.driver=$SAXDRIVER 
$MAIN $JUMP_OPTS
    
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to