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

Experimental support of JDK23 and 22 for GlassFish 7 #25092

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

dmatej
Copy link
Contributor

@dmatej 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 ;-)

dmatej added 4 commits August 13, 2024 19:07
…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>
@dmatej dmatej added the component upgrade A component dependency has been upgraded label Aug 13, 2024
@dmatej dmatej added this to the 7.0.17 milestone Aug 13, 2024
@dmatej dmatej requested review from arjantijms, pzygielo, avpinchuk and a team August 13, 2024 18:43
@dmatej dmatej self-assigned this Aug 13, 2024
@dmatej

This comment was marked as 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) {
Copy link
Contributor

@pzygielo pzygielo Aug 14, 2024

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.)

Copy link
Contributor Author

@dmatej dmatej Aug 14, 2024

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.

@dmatej dmatej merged commit 09f1a22 into eclipse-ee4j:master Aug 14, 2024
2 checks passed
@dmatej dmatej deleted the jdk23 branch August 14, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component upgrade A component dependency has been upgraded
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants