Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase Umlet min Java version to 8 (v15.2 already required 8 due to a dependency) #729

Open
gerrycampion opened this issue Jul 26, 2023 · 5 comments
Milestone

Comments

@gerrycampion
Copy link

When starting UMLet on a windows machine without Java, a notification says that Java 6 is required. I tried running with Java 6 and Java 7, but neither worked. After running with Java 8, UMLet starts up with no problems.

@afdia
Copy link
Collaborator

afdia commented Jul 27, 2023

Java 6 is just the minimum requirement, but any later version works too.

Unfortunately the whole "Java topic" is getting more and more complicated to understand for users with all the different distributions, but for Umlet you can use any Java or JDK distribution >=6. It doesnt matter if its the Oracle Java distribution or any OpenJDK like Temurin from https://adoptium.net/

@gerrycampion
Copy link
Author

gerrycampion commented Jul 27, 2023

When I ran with JRE 6 and JRE 7 (from Oracle), it gave an error that it could not find the main class and it did not start. When I ran with Java 8, I did not get an error.

@gerrycampion
Copy link
Author

More details

JRE 6 when running Umlet.exe

Java Virtual Machine Launcher
Could not find the main class:
com.baselet.standalone.MainStandalone. Program will exit.

JRE 6 when running

java -jar umlet.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/slf4j/LoggerFactory : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.baselet.standalone.MainStandalone.(MainStandalone.java:38)
Could not find the main class: com.baselet.standalone.MainStandalone. Program will exit.

JRE 7 when running Umlet.exe:

Java Virtual Machine Launcher
A Java Exception has occured.

JRE 7 when running

java -jar umlet.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/slf4j/LoggerFactory : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.baselet.standalone.MainStandalone.(MainStandalone.java:38)

@afdia
Copy link
Collaborator

afdia commented Jul 27, 2023

Thanks for the tests, so it seems that slf4j (a dependency which umlet uses) is no longer working with Java6 or 7 which means Umlet also requires at minimum v8. We should update the https://github.com/umlet/umlet/blob/master/umlet-standalone/src/exe/Umlet.exe which still says Java6 before the next release. Maybe launch4j has improved other things as well such as Java discovery (it seems so looking at https://launch4j.sourceforge.net/changelog.html)

That said, using Java 6 or 7 today is always a bad idea because nobody provides security updates anymore (at least not for free)

@afdia afdia added this to the 15.2 milestone Jul 27, 2023
@afdia
Copy link
Collaborator

afdia commented Oct 11, 2023

To fix the issue we will recreate umlet.exe with the latest launch4j release and the min Java version should be set to 8, also updating the launch4j config for Umlet https://github.com/umlet/umlet/blob/master/umlet-standalone/src/exe/launch4j_project.xml

@afdia afdia changed the title UMLet says Java 6 is required Increase Umlet min Java version to 8 (v15.2 already required 8 due to a dependency) Oct 11, 2023
afdia added a commit that referenced this issue Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants