FS#50479 - [josm] Java version not accepted
Attached to Project:
Community Packages
Opened by georg (fordprefect) - Monday, 22 August 2016, 07:49 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Tuesday, 23 August 2016, 15:59 GMT
Opened by georg (fordprefect) - Monday, 22 August 2016, 07:49 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Tuesday, 23 August 2016, 15:59 GMT
|
Details
Description:
installed: * josm 10786-2 * jre7-openjdk 7.u111_2.6.7-1 * jre8-openjdk 8.u102-1 when starting josm it complains and exits straight away: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/openstreetmap/josm/gui/MainApplication : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) |
This task depends upon
Closed by Jaroslav Lichtblau (Dragonlord)
Tuesday, 23 August 2016, 15:59 GMT
Reason for closing: Implemented
Additional comments about closing: Implemented in josm-10786-3
Tuesday, 23 August 2016, 15:59 GMT
Reason for closing: Implemented
Additional comments about closing: Implemented in josm-10786-3
because if you read the changelog of Josm we can see this :
"Switch to Java 8 with code improvements"
https://josm.openstreetmap.de/wiki/Changelog#stable-release-16.07
you should check if jre8 is the default by typing "java -version", things will be ok if you set java to 8 as default jre,
java 7 is too old now, it's better to switch to java 8 ( security updates, bugfixes, new features )
"warning : you need to switch to java 8 as default JRE, josm is not anymore compatible with java 7"
but I don't think it's really a bug ( not sure if upstream really want to fix this bug ), because josm has been reworked in order to work only with java 8 ( and not java 7 ), josm developpers have switched to java 8 :
https://josm.openstreetmap.de/ticket/11390
maybe in the PKGBUILD we can specify the version of java as dependency ( "jre8-openjdk" instead of "java-runtime" ) and make a script ( .postinstall ) in order to check if the default version of java is really 8 and not 7 ?
/usr/bin/java is a link to /usr/lib/jvm/default-runtime/bin/java
/usr/lib/jvm/default-runtime is a symlink to java-7-openjdk/jre
/usr/lib/jvm/default-runtime is owned by java-runtime-common
the package java-runtime-common thus sets the default java for arch.
if a packager wants its program to run with a different java version,
he needs to adjust the starter accordingly, as well as the dependencies.
IMO this clearly is a packaging bug. please fix.