<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1531</bug_id>
          
          <creation_ts>2025-08-30 11:08:19 +0200</creation_ts>
          <short_desc>OpenJDK 24: Pass &apos;--enable-native-access=ALL-UNNAMED&apos; to all unit test (JEP 472)</short_desc>
          <delta_ts>2025-08-30 11:37:31 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>General</product>
          <component>builds</component>
          <version>2.6.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>FEATURE</cf_type>
          <cf_scm_refs>gluegen 0dea7cd41120291486f4906333bfe639ea1bc198
joal a16d1e631091a3eb27f6f10b7e7d279df6b3e8e2
jogl 92336365cd326cd6cb0da7940cee3f3f7f70cc7f
jocl 92336365cd326cd6cb0da7940cee3f3f7f70cc7f</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7271</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2025-08-30 11:08:19 +0200</bug_when>
    <thetext>https://openjdk.org/jeps/472

Since JDK 17, the `java` command allowed passing &apos;--enable-native-access=ALL-UNNAMED&apos; (as well as &apos;--add-open&apos; etc).

Since JDK 24 the JVM is complaining about not having enabled such access
for certain java methods when called. See:

+++
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.jogamp.common.jvm.JNILibLoaderBase in an unnamed module (file:/usr/local/projects/JogAmp/gluegen/build-macosx/gluegen-rt.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
+++

Specify `jvmarg.modules` in GlueGen&apos;s make/jogamp-env.xml for all modules, 
also adding the &apos;--add-open ...&apos; directive for JOGL&apos;s&apos; AWT access:

`--enable-native-access=ALL-UNNAMED --add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.desktop/sun.awt.windows=ALL-UNNAMED --add-opens java.desktop/sun.java2d=ALL-UNNAMED`

Also define jvmarg.generic = ${jvmarg.modules},
to be used for all `java` invocations of our unit tests.

Further supplement these arguments to our test scripts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7272</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2025-08-30 11:37:31 +0200</bug_when>
    <thetext>resolved as described in all core modules</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>