Merge pull request #695 from nasa/java-11

Support Java 11
This commit is contained in:
Scott Fennell 2018-11-06 15:38:56 -06:00 committed by GitHub
commit 51ddcfaae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 19 deletions

View File

@ -1,4 +1,5 @@
# Downloads the external java packages Trick uses. We use the maven repository to
# get the jar file. Currently we fix the version of the jar files we download.
# I wonder how long the links stay unchanged and active (Alex 1/22/15)
@ -18,7 +19,14 @@ EXTERNAL_JARS = \
hamcrest-core-1.3.jar \
pdfbox-2.0.11.jar \
fontbox-2.0.11.jar \
commons-logging-1.2.jar
commons-logging-1.2.jar \
jaxb-runtime-2.4.0-b180830.0438.jar \
jaxb-xjc-2.4.0-b180830.0438.jar \
jaxb-jxc-2.4.0-b180830.0438.jar \
jaxb-impl-2.4.0-b180830.0438.jar \
jaxb-api-2.4.0-b180725.0427.jar \
jaxb-core-2.3.0.1.jar \
javax.activation-1.2.0.jar
external_jars : ${EXTERNAL_JARS}
@ -45,6 +53,19 @@ fontbox-2.0.11.jar :
curl --retry 4 -O http://repo.maven.apache.org/maven2/org/apache/pdfbox/fontbox/2.0.11/fontbox-2.0.11.jar
commons-logging-1.2.jar :
curl --retry 4 -O https://repo1.maven.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
jaxb-runtime-2.4.0-b180830.0438.jar:
curl --retry 4 -O http://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-runtime/2.4.0-b180830.0438/jaxb-runtime-2.4.0-b180830.0438.jar
jaxb-xjc-2.4.0-b180830.0438.jar:
curl --retry 4 -O http://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-xjc/2.4.0-b180830.0438/jaxb-xjc-2.4.0-b180830.0438.jar
jaxb-jxc-2.4.0-b180830.0438.jar:
curl --retry 4 -O http://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-jxc/2.4.0-b180830.0438/jaxb-jxc-2.4.0-b180830.0438.jar
jaxb-impl-2.4.0-b180830.0438.jar:
curl --retry 4 -O http://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-impl/2.4.0-b180830.0438/jaxb-impl-2.4.0-b180830.0438.jar
jaxb-core-2.3.0.1.jar:
curl --retry 4 -O http://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar
jaxb-api-2.4.0-b180725.0427.jar:
curl --retry 4 -O http://repo.maven.apache.org/maven2/javax/xml/bind/jaxb-api/2.4.0-b180725.0427/jaxb-api-2.4.0-b180725.0427.jar
javax.activation-1.2.0.jar:
curl --retry 4 -O http://repo.maven.apache.org/maven2/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.jar
clean:
rm -f ${EXTERNAL_JARS}

View File

@ -27,10 +27,6 @@ sub launch_java($$) {
}
$java_dir = "$ENV{TRICK_HOME}/$lib_dir/trick/java" ;
$javac_version = `javac -version 2>&1` ;
$javac_version =~ /(\d+)/ ;
$javac_version = $1 ;
$host_cpu = gte("TRICK_HOST_CPU") ;
chomp($host_cpu) ;
$ENV{TRICK_HOST_CPU} = $host_cpu ;
@ -43,10 +39,7 @@ sub launch_java($$) {
} else {
$command = "java -cp $java_dir/dist/*:$java_dir/lib/*:$java_dir/lib/ \\" ;
}
if ( ($javac_version eq "9") or ($javac_version eq "10") ) {
$command .= "
--add-modules java.se.ee \\" ;
}
$command .= "
$application" ;

View File

@ -8,15 +8,6 @@ JAVAC_FLAGS = -g -Xlint:unchecked -Xlint:deprecation
# delineate 'javac -version' for version number
JAVAC_VERSION := $(shell ${JAVAC} -version 2>&1 | perl -ne 'print /(\d+)/')
# include java.se.ee for JAXB xml annotations (for trick-tv) in java version 9
ifeq ($(JAVAC_VERSION),9)
JAVAC_FLAGS += --add-modules java.se.ee
endif
ifeq ($(JAVAC_VERSION),10)
JAVAC_FLAGS += --add-modules java.se.ee
endif
SRC_DIR = src
SRC_FILES = $(shell find ${SRC_DIR} -type f -name \*.java)
BUILD_DIR = build