tstaerk@tstaerk-laptop:~/gnuaccounting$ ./gnuaccounting.sh
Exception in thread "main" java.lang.UnsupportedClassVersionError: gnuaccounting/MainWindow (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Logged In: YES
user_id=1692926
Originator: NO
Here's my patch:
--- gnuaccounting.sh.org 2007-06-18 13:14:33.000000000 +0200
+++ gnuaccounting.sh 2007-06-18 13:17:58.000000000 +0200
@@ -1,2 +1,8 @@
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
-java -Djava.library.path=. -cp ./org.eclipse.core.commands_3.2.0.I20060605-1400.jar:./org.eclipse.equinox.common_3.2.0.v20060603.jar:./org.eclipse.jface_3.2.1.M20060908-1000.jar:./org.eclipse.swt_3.2.1.v3235e.jar:./org.eclipse.swt.gtk.linux.x86_3.2.1.v3235.jar:./noa-2.0.jar:./unoil.jar:./ridl.jar:./hsqldb.jar:./bion_officebean-2.0.jar:./juh.jar:./bion_jurt-2.0.jar:. gnuaccounting/MainWindow
\ No newline at end of file
+if [ -e /usr/lib/jvm/java-1.5.0-sun/bin/java ]
+then
+ echo "Using /usr/lib/jvm/java-1.5.0-sun/bin/java"
+ export dir=/usr/lib/jvm/java-1.5.0-sun/bin/
+fi
+ echo $dir
+ ${dir}java -Djava.library.path=. -cp ./org.eclipse.core.commands_3.2.0.I20060605-1400.jar:./org.eclipse.equinox.common_3.2.0.v20060603.jar:./org.eclipse.jface_3.2.1.M20060908-1000.jar:./org.eclipse.swt_3.2.1.v3235e.jar:./org.eclipse.swt.gtk.linux.x86_3.2.1.v3235.jar:./noa-2.0.jar:./unoil.jar:./ridl.jar:./hsqldb.jar:./bion_officebean-2.0.jar:./juh.jar:./bion_jurt-2.0.jar:. gnuaccounting/MainWindow
Logged In: YES
user_id=194873
Originator: NO
To be honest, I don't like this patch.
1) Is /usr/lib/jvm/java-1.5.0-sun/bin/java a default path (by whom? Sun? SuSE? LSB?)
2) What do we do on non-linux unix-like systems like solaris or BSD?
3) What do we do on 64bit systems? can it be /usr/lib64/jvm/java-1.5.0-sun/bin/java there?
4) is there another possibility to fetch a wrong java version like a try/catch or maybe even only a java -version shell construct?
5) is the environment variable $JAVA_HOME maybe what we're looking for? Could you please send me the output of "echo $JAVA_HOME"?
6) what do we do if we suddenly require JRE 1.6?
7) who should have a JRE 1.4 in her path when a JRE 1.5 is availble at /usr/lib/jvm/java-1.5.0-sun/bin/?
I disagree to default on one distribution, this thing is supposed to be free software, free in a sense that it is also runnable on
other systems -- that (and the market share) is the reason that
there is a windows version and that gnuaccounting is written in java in the first place.
IMHO, open standards should ensure that a software can be equally user friendly AND interoperable, thus
giving the user the freedom to choose -- and the software author less work to adept the software.
Logged In: YES
user_id=194873
Originator: NO
as discussed, your patch has been denied, please test my patch:
Index: C:/Users/jstaerk/workspace/gnuaccounting/gnuaccounting.sh
===================================================================
--- C:/Users/jstaerk/workspace/gnuaccounting/gnuaccounting.sh (revision 15)
+++ C:/Users/jstaerk/workspace/gnuaccounting/gnuaccounting.sh (working copy)
@@ -1,3 +1,12 @@
#!/bin/bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
-$JAVA_HOME/bin/java -Djava.library.path=. -cp ./org.eclipse.core.commands_3.2.0.I20060605-1400.jar:./org.eclipse.equinox.common_3.2.0.v20060603.jar:./org.eclipse.jface_3.2.1.M20060908-1000.jar:./org.eclipse.swt_3.2.1.v3235e.jar:./org.eclipse.swt.gtk.linux.x86_3.2.1.v3235.jar:./noa-2.0.jar:./unoil.jar:./ridl.jar:./hsqldb.jar:./bion_officebean-2.0.jar:./juh.jar:./bion_jurt-2.0.jar:. GUI/MainWindow
\ No newline at end of file
+FILE=$JAVA_HOME/bin/java
+ARGUMENTS="-Djava.library.path=. -cp ./org.eclipse.core.commands_3.2.0.I20060605-1400.jar:./org.eclipse.equinox.common_3.2.0.v20060603.jar:./org.eclipse.jface_3.2.1.M20060908-1000.jar:./org.eclipse.swt_3.2.1.v3235e.jar:./org.eclipse.swt.gtk.linux.x86_3.2.1.v3235.jar:./noa-2.0.jar:./unoil.jar:./ridl.jar:./hsqldb.jar:./bion_officebean-2.0.jar:./juh.jar:./bion_jurt-2.0.jar:. GUI/MainWindow"
+if [ -f $FILE ];
+then
+# java_home is set
+$FILE $ARGUMENTS
+else
+# lets hope java is at least in the classpath
+java $ARGUMENTS
+fi