Digital Snake®
14-08-2010, 12:43
Buongiorno a tutti.
da un po' di tempo, utilizzo un programma in java free per la gestione di riparazione (cosa che faccio per hobby).
Fino ad ora l'ho sempre usato su windows, ma recentemente su un portatile che ho sistemato, ho installato ubuntu e ora mi piacerebbe poter usare questo programma anche su linux.
Premetto che su ubuntu ho già installato JAVA, perfettamente funzionante, ora devo solo capire come creare un file batch per linux ed avviare quindi il programma.
Sotto windows ho un file .bat con all'interno le seguenti istruzioni:
@echo off
start javaw -cp lib\gestRip.jar;lib\f2edit.jar;lib\liquidlnf.jar;lib\f2util.jar;lib\derby.jar;lib\jaybird-full-2.1.6.jar;lib\jcalendar-1.3.2.jar;lib\log4j-1.2.15.jar;lib\commons-beanutils-1.7.jar;lib\commons-collections-2.1.jar;lib\commons-digester-1.7.jar;lib\commons-javaflow-20060411.jar;lib\commons-logging-1.0.2.jar;lib\itext-1.3.1.jar;lib\jasperreports-3.0.0.jar;lib\poi-3.0.1-FINAL-20070705.jar it.f2.gestRip.StartApp
Ho anche un dile di tipo sh con il seguente codice:
#! /bin/sh
[ ${JAVA_HOME} ] && JAVA=${JAVA_HOME}/bin/java || JAVA=java
# Are we running within Cygwin on some version of Windows?
cygwin=false;
case "`uname -s`" in
CYGWIN*) cygwin=true ;;
esac
# ReparsLab home.
RL_HOME='/home/fabrizio/Scrivania/RepairsLab-1.0.1a2'
# ReparsLab home in Unix format.
if $cygwin ; then
UNIX_STYLE_HOME=`cygpath "$RL_HOME"`
else
UNIX_STYLE_HOME=$RL_HOME
fi
# First entry in classpath is the ReparsLab application.
TMP_CP=$UNIX_STYLE_HOME/gestRip.jar
# Then add all library jars to the classpath.
IFS=""
for a in $UNIX_STYLE_HOME/lib/*; do
TMP_CP="$TMP_CP":"$a";
done
# Now add the system classpath to the classpath. If running
# Cygwin we also need to change the classpath to Windows format.
if $cygwin ; then
TMP_CP=`cygpath -w -p $TMP_CP`
TMP_CP=$TMP_CP';'$CLASSPATH
else
TMP_CP=$TMP_CP:$CLASSPATH
fi
$JAVA -Xmx256m -cp $TMP_CP it.f2.gestRip.StartApp
Non sapendo nulla di comandi di riga ed essendo un novizio di linux..chiedo aiuto a qualcuno più esperto :)
da un po' di tempo, utilizzo un programma in java free per la gestione di riparazione (cosa che faccio per hobby).
Fino ad ora l'ho sempre usato su windows, ma recentemente su un portatile che ho sistemato, ho installato ubuntu e ora mi piacerebbe poter usare questo programma anche su linux.
Premetto che su ubuntu ho già installato JAVA, perfettamente funzionante, ora devo solo capire come creare un file batch per linux ed avviare quindi il programma.
Sotto windows ho un file .bat con all'interno le seguenti istruzioni:
@echo off
start javaw -cp lib\gestRip.jar;lib\f2edit.jar;lib\liquidlnf.jar;lib\f2util.jar;lib\derby.jar;lib\jaybird-full-2.1.6.jar;lib\jcalendar-1.3.2.jar;lib\log4j-1.2.15.jar;lib\commons-beanutils-1.7.jar;lib\commons-collections-2.1.jar;lib\commons-digester-1.7.jar;lib\commons-javaflow-20060411.jar;lib\commons-logging-1.0.2.jar;lib\itext-1.3.1.jar;lib\jasperreports-3.0.0.jar;lib\poi-3.0.1-FINAL-20070705.jar it.f2.gestRip.StartApp
Ho anche un dile di tipo sh con il seguente codice:
#! /bin/sh
[ ${JAVA_HOME} ] && JAVA=${JAVA_HOME}/bin/java || JAVA=java
# Are we running within Cygwin on some version of Windows?
cygwin=false;
case "`uname -s`" in
CYGWIN*) cygwin=true ;;
esac
# ReparsLab home.
RL_HOME='/home/fabrizio/Scrivania/RepairsLab-1.0.1a2'
# ReparsLab home in Unix format.
if $cygwin ; then
UNIX_STYLE_HOME=`cygpath "$RL_HOME"`
else
UNIX_STYLE_HOME=$RL_HOME
fi
# First entry in classpath is the ReparsLab application.
TMP_CP=$UNIX_STYLE_HOME/gestRip.jar
# Then add all library jars to the classpath.
IFS=""
for a in $UNIX_STYLE_HOME/lib/*; do
TMP_CP="$TMP_CP":"$a";
done
# Now add the system classpath to the classpath. If running
# Cygwin we also need to change the classpath to Windows format.
if $cygwin ; then
TMP_CP=`cygpath -w -p $TMP_CP`
TMP_CP=$TMP_CP';'$CLASSPATH
else
TMP_CP=$TMP_CP:$CLASSPATH
fi
$JAVA -Xmx256m -cp $TMP_CP it.f2.gestRip.StartApp
Non sapendo nulla di comandi di riga ed essendo un novizio di linux..chiedo aiuto a qualcuno più esperto :)