Sorry for so long a gap, other pressing things to do.
I had a little "progress": when I used the command:
java -cp lib/* -jar jtrak_linux.jar
and the error message changed, meaning giving the list of all *.jar files in the "lib"
directory caused java to find the previously not found class:
Code:
<localhost>.../JTrak_119_linux>java -cp lib/* -jar jtrak_linux.jar
Exception in thread "main" java.lang.NoClassDefFoundError: lib/FormatedTextFields-2/0/jar
Caused by: java.lang.ClassNotFoundException: lib.FormatedTextFields-2.0.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: lib/FormatedTextFields-2.0.jar. Program will exit.
Please pay attention that the class path Java attempted to search for was: "lib/FormatedTextFields-2/0/jar"
while the file existing in the "lib" directory is named: "FormatedTextFields-2.0.jar".
It looks like Java mis-interpreted the dots in the file name as a class hierarchy delimiter
and replaced them with "/" characters. I attempted renaming the file to "FormatedTextFields-2_0.jar"
but it didn't allowed Java to find it, maybe because in the "manifest" file
the list of files in the "lib" directory contains the original name.
So, is there a way to alter Java's interpretation of the dots in filename of *.jar archives?
TIA for any help,
kaza.
Quote:
Originally Posted by mrcheeks
Try the following code
Code:
APP_FOLDER=FULL_PATH_OF_JTRACK_FOLDER_LOCATION
MAINCLASS="de.frobese.jtrak.app.JTrakLinux"
JTRAK_CLASSPATH=.
for file in `ls $APP_FOLDER/lib/*.jar`; do JTRAK_CLASSPATH=$JTRAK_CLASSPATH:$file; done
java -Djava.library.path=$APP_FOLDER -cp $JTRAK_CLASSPATH $MAINCLASS
|