Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions release/build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<!-- A Java 9 or later compiler is required -->

<exec executable="java_home" outputproperty="jdk">
<arg value="-F"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including the -F never builds for me, because java_home -F doesn't obey the plus in 9+ and fails with any jdk other than version 9.*.

<arg value="-v"/>
<arg value="9+"/>
</exec>
Expand Down Expand Up @@ -45,10 +44,14 @@
<property name="cc" value="/usr/bin/cc"/>
<property name="lipo" location="/usr/bin/lipo"/>

<!-- Note: open source JavaNativeFoundation is required to build for arm, see https://github.com/apple/openjdk -->

<property name="JNFdir" location="${SDKroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks"/>

<!--
JNFdir specifies the location of Apple's JavaNativeFoundation.framework which can be acquired
at https://github.com/apple/openjdk/tree/xcodejdk14-release/apple/JavaNativeFoundation
Build it using Xcode and place the resulting JavaNativeFoundation.framework in the lib folder,
or override the JNFdir property to point to a folder that contains your own build of the framework.
-->
<property name="JNFdir" location="${base}/lib/"/>

Comment on lines +47 to +54
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JavaNativeFoundation framework is not (or is no longer) present under the SDK folder, so explain how to get it and where to put it.

<property name="debug" value="false"/>
<property name="debugoption" value=""/>

Expand Down Expand Up @@ -195,13 +198,14 @@
<arg value="Cocoa"/>
<arg line="${additional.jni.frameworks}"/>

<arg value="-F/${SDKroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks"/>
<arg value="-F${SDKroot}/System/Library/Frameworks/JavaVM.framework/Versions/Current/Frameworks"/>
<arg value="-framework"/>
<arg value="JavaRuntimeSupport"/>

<arg value="-F${JNFdir}"/>
<arg value="-framework"/>
<arg value="JavaNativeFoundation"/>

<arg value="-install_name"/>
<arg value="${jniname}.dylib"/>

Expand Down