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

Java 17 support #182

Open
nsoft opened this issue Mar 29, 2023 · 3 comments
Open

Java 17 support #182

nsoft opened this issue Mar 29, 2023 · 3 comments
Milestone

Comments

@nsoft
Copy link
Owner

nsoft commented Mar 29, 2023

We do not currently support Java 17, but support should be added. This may be somewhat difficult however, Here's what one gets with

openjdk 17.0.6 2023-01-17 LTS
OpenJDK Runtime Environment Zulu17.40+19-CA (build 17.0.6+10-LTS)
OpenJDK 64-Bit Server VM Zulu17.40+19-CA (build 17.0.6+10-LTS, mixed mode, sharing)

gives

CRASH and BURNED before starting main thread:
java.lang.NoSuchFieldException: scl
        at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
        at org.jesterj.ingest.Main.initClassloader(Main.java:363)
        at org.jesterj.ingest.Main.main(Main.java:96)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.needhamsoftware.unojar.Boot.main(Boot.java:233)

To get class loading doing what we want we've been futzing with the system classloader, new code will be necessary since this has either moved, or become inaccessible (I suspect the later).

@nsoft nsoft added this to the 1.1 milestone Mar 29, 2023
@nsoft
Copy link
Owner Author

nsoft commented Mar 29, 2023

There is a small chance that the move should be enhancements to uno-jar instead of JesterJ...

@nsoft
Copy link
Owner Author

nsoft commented Mar 30, 2023

This is running afoul of changes made during JEP-371 openjdk/jdk@7cc1371

@nsoft nsoft modified the milestones: 1.1, 1.2 Apr 8, 2023
@nsoft
Copy link
Owner Author

nsoft commented Feb 27, 2024

This irritates me from time to time but I haven't had time to explore solutions. Today I had the thought that if I can add a "relaunch with props" feature to UnoJar to make it re-invoke itself with system properties derived from some convention (manifest, or included file) set by uno-jar then -Dsystem.class.loader=org.jesterj.JesterJLoader could be set. That would probably be a nice feature for UnoJar anyway, though it may be difficult to make that work reliably on all OS's

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

1 participant