Skip to content

Commit 8493cb3

Browse files
authored
Enable native access in executable JARs
Support use from JDK 25 by adding Enable-Native-Access=ALL-UNNAMED to JARs that have a main class. Partially addresses compatibility with Java 25.
1 parent 83ca45e commit 8493cb3

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,8 @@ jar {
650650
attributes ([
651651
'Main-Class': 'org.python.util.jython',
652652
'Built-By': 'build.gradle',
653-
'Automatic-Module-Name': 'org.python.jython2'
653+
'Automatic-Module-Name': 'org.python.jython2',
654+
'Enable-Native-Access': 'ALL-UNNAMED'
654655
])
655656

656657
attributes( [ // Build-Info section

build.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,7 @@ The text for an official release would continue like ...
924924
<attribute name="Implementation-Vendor" value="Python Software Foundation"/>
925925
<attribute name="Implementation-Title" value="Jython fat jar"/>
926926
<attribute name="Implementation-Version" value="${jython.version}"/>
927+
<attribute name="Enable-Native-Access" value="ALL-UNNAMED"/>
927928
<!-- info section. ATTN: no blanks, no '.' in the names -->
928929
<section name="Build-Info">
929930
<attribute name="version" value="${jython.version}" />
@@ -948,6 +949,7 @@ The text for an official release would continue like ...
948949
<attribute name="Implementation-Vendor" value="Python Software Foundation"/>
949950
<attribute name="Implementation-Title" value="Jython fat jar with stdlib"/>
950951
<attribute name="Implementation-Version" value="${jython.version}"/>
952+
<attribute name="Enable-Native-Access" value="ALL-UNNAMED"/>
951953
<!-- info section. ATTN: no blanks, no '.' in the names -->
952954
<section name="Build-Info">
953955
<attribute name="version" value="${jython.version}" />

0 commit comments

Comments
 (0)