MacOS JDK 26 Removed the applet class

classic Classic list List threaded Threaded
♦
♦
9 messages Options
Reply | Threaded
Open this post in threaded view
♦
♦
|

MacOS JDK 26 Removed the applet class

hharrison
Administrator
We got a report of jaamsim not working on MacOS java 26, looks like newtcanvasAWT still references the old Applet class.

Probably time to retire the applet code in jogl.

Bug report and stack trace here for interest sake.

https://github.com/jaamsim/jaamsim/issues/38

Harvey
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: MacOS JDK 26 Removed the applet class

hharrison
Administrator
More context for the Applet removal in Java 26. Just FYI.

https://inside.java/2025/12/03/applet-removal/
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: MacOS JDK 26 Removed the applet class

schnied
In JDK 27 the class sun.awt.AppContext has been removed, which causes this ClassNotFoundException:

Caught AppContextInfo(Bug 1004) ClassNotFoundException: sun.awt.AppContext on thread J3D-Renderer-1
    [0]: java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
    [1]: java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:502)
    [2]: java.base/java.lang.Class.forName0(Native Method)
    [3]: java.base/java.lang.Class.forName(Class.java:479)
    [4]: java.base/java.lang.Class.forName(Class.java:469)
    [5]: com.jogamp.nativewindow.awt.AppContextInfo$1$1.run(AppContextInfo.java:38)

Any thoughts on removing references to "AppContext" from JOGL?

Thank you in advance,
Mike
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: MacOS JDK 26 Removed the applet class

gouessej
Administrator
I try to remember, it had something to do with Java Webstart, all this should be removed.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: MacOS JDK 26 Removed the applet class

hharrison
Administrator
In reply to this post by schnied
I think this is due to unexpected classes to unnamed modules, can you try running with the following arguments and see if it makes a difference?

--add-exports=java.desktop/sun.awt=ALL-UNNAMED

Harvey
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: MacOS JDK 26 Removed the applet class

hharrison
Administrator
In reply to this post by schnied
Actually, this is an internal information dump only, is anything actually non-functional after this error? While it is dumping the information, does the Java3D rendering still work?

Harvey
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: MacOS JDK 26 Removed the applet class

schnied
Thanks for the help!

Indeed - our application is functional despite the logging.

Here are the start-up flags I'm using:
--add-opens=java.desktop/java.awt=ALL-UNNAMED --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.desktop/sun.java2d=ALL-UNNAMED

It looks like JOGL uses com.jogamp.nativewindow.awt.AppContextInfo to inspect sun.awt.AppContext via reflection to manage native window handles and event queues in applet environments.

The only way to eliminate the message is an updated build that omits the legacy sun.awt.AppContext probe.
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: MacOS JDK 26 Removed the applet class

Sven Gothel
Administrator
Thx. Will remove the AppContextInfo and related calls in coming release.
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: MacOS JDK 26 Removed the applet class

schnied
Thanks Sven!