-
Notifications
You must be signed in to change notification settings - Fork 148
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
Experimental support of JDK23 and 22 for GlassFish 7 #25092
Conversation
dmatej
commented
Aug 13, 2024
- Deleted JDK class
- Using Runtime.version() instead
- Added osgi properties for new Java versions
- quickly tested just locally - support rather experimental but worth of trying as we try to make GlassFish a robust industry standard again ;-)
…e.version Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
- was obsoleted and did not work well with JDK23 - since JDK10 it is possible to get version id directly from Runtime. Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
This comment was marked as resolved.
This comment was marked as resolved.
nucleus/admin/cli/src/main/java/com/sun/enterprise/admin/cli/AdminMain.java
Outdated
Show resolved
Hide resolved
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
if (major < 11) { | ||
System.err.println(strings.get("OldJdk", major, minor)); | ||
Version version = Runtime.version(); | ||
if (version.feature() < 11) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering - how this can be entered and "OldJdk" used, given
com/sun/enterprise/admin/cli/AdminMain.class: compiled Java class data, version 55.0 (Java SE 11)
and with 8, JVM of course refuses to start:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/glassfish/admin/cli/AsadminMain has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
(But this is for another issue/PR, if ever.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was in cases when ie in jdk 1.6u22 or so oracle/sun added some features and gf needed them. I am not sure how dead this code is, but yeah, we can remove it and add it just when it would be required again.