Skip to content

Commit 1744fdd

Browse files
LeviticusMBjoeferner
authored andcommitted
Removed support for legacy macOS Java runtimes.
1 parent b38a6a0 commit 1744fdd

File tree

2 files changed

+10
-52
lines changed

2 files changed

+10
-52
lines changed

binding.gyp

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@
1515
['OS=="win"', {
1616
'javahome%': '<!(node findJavaHome.js)'
1717
}],
18-
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" or OS=="zos"' , {
18+
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" or OS=="zos"', {
1919
'javahome%': '<!(node findJavaHome.js)'
2020
}],
21-
['OS=="mac"', {
22-
'javaver%' : "<!(awk -F/ -v h=`node findJavaHome.js` 'BEGIN {n=split(h, a); print a[2]; exit}')"
23-
}],
2421
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" or OS=="zos"', {
2522
'javalibdir%': "<!(./find_java_libdir.sh <(target_arch) <(OS))"
2623
}],
@@ -128,40 +125,14 @@
128125
'xcode_settings': {
129126
'OTHER_CFLAGS': ['-O3'],
130127
},
131-
'conditions': [
132-
['javaver=="Library"',
133-
{
134-
'include_dirs': [
135-
'<(javahome)/include',
136-
'<(javahome)/include/darwin'
137-
],
138-
'libraries': [
139-
'-L<(javalibdir)',
140-
'-Wl,-rpath,<(javalibdir)',
141-
'-ljli'
142-
],
143-
},
144-
],
145-
['javaver=="System"',
146-
{
147-
'include_dirs': [
148-
'/System/Library/Frameworks/JavaVM.framework/Headers'
149-
],
150-
'libraries': [
151-
'-framework JavaVM'
152-
],
153-
},
154-
],
155-
['javaver==""',
156-
{
157-
'include_dirs': [
158-
'/System/Library/Frameworks/JavaVM.framework/Headers'
159-
],
160-
'libraries': [
161-
'-framework JavaVM'
162-
],
163-
},
164-
],
128+
'include_dirs': [
129+
'<(javahome)/include',
130+
'<(javahome)/include/darwin'
131+
],
132+
'libraries': [
133+
'-L<(javalibdir)',
134+
'-Wl,-rpath,<(javalibdir)',
135+
'-ljli'
165136
],
166137
},
167138
],

compile-java-code.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,7 @@
22

33
JAVA_VERSION=1.7
44

5-
if [ -x /usr/libexec/java_home ]; then
6-
# On MacOS we can do this to choose the Java 1.7 JDK
7-
# and then let the JDK default -source and -target to 1.7
8-
JAVA_HOME=$(/usr/libexec/java_home -v ${JAVA_VERSION})
9-
10-
cd test
11-
${JAVA_HOME}/bin/javac *.java
12-
13-
cd ../src-java/node
14-
${JAVA_HOME}/bin/javac *.java
15-
16-
cd ../../
17-
${JAVA_HOME}/bin/javah -classpath src-java -d ./src node.NodeDynamicProxyClass
18-
elif [ -n "$1" ]; then
5+
if [ -n "$1" ]; then
196
JAVA_HOME=$1
207
JAVAC_OPTS="-source ${JAVA_VERSION} -target ${JAVA_VERSION} -bootclasspath ${JAVA_HOME}/jre/lib/rt.jar"
218

0 commit comments

Comments
 (0)