changeset 33:a0b1b1aa6cdf

add modules
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 19 Dec 2017 09:05:20 +0900
parents 05294e96a284
children 49be04cc6389
files build.xml src/main/gov/nasa/jpf/vm/HashedAllocationContext.java
diffstat 2 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/build.xml	Mon Feb 06 18:03:21 2017 -0800
+++ b/build.xml	Tue Dec 19 09:05:20 2017 +0900
@@ -29,6 +29,10 @@
 
   <uptodate property="build_uptodate" targetfile="build/main/gov/nasa/jpf/build.properties" srcfile="build.properties"/>
 
+  <condition property="java9">
+     <equals arg1="${ant.java.version}" arg2="9"/>
+  </condition>
+
 
   <!-- generic classpath settings -->
   <path id="lib.path">
@@ -72,6 +76,9 @@
     <condition property="have_java8">
         <equals arg1="${ant.java.version}" arg2="1.8"/>
     </condition>
+    <condition property="have_java9">
+        <equals arg1="${ant.java.version}" arg2="1.9"/>
+    </condition>
 
   </target>
 
@@ -94,12 +101,17 @@
     <mkdir dir="build/main"/>
     <javac srcdir="src/main" destdir="build/main" includeantruntime="false"
            debug="${debug}" deprecation="${deprecation}" classpathref="lib.path">
+        <compilerarg value="--module-path"/>
+        <compilerarg value="build/annotations"/> 
+        <compilerarg value="--add-exports" />
+        <compilerarg value="java.xml/com.sun.org.apache.bcel.internal.generic=gov.nasa.jpf"/> 
+        <compilerarg value="--add-exports" />
+        <compilerarg value="java.base/jdk.internal.misc=gov.nasa.jpf"/> 
     	<!--
         <compilerarg value="-XDenableSunApiLintControl"/>
         <compilerarg value="-Xlint:all"/>
         -->
     </javac>
-
   </target>
   
   <target name="-compile-peers" if="have_peers" depends="-compile-main" >
--- a/src/main/gov/nasa/jpf/vm/HashedAllocationContext.java	Mon Feb 06 18:03:21 2017 -0800
+++ b/src/main/gov/nasa/jpf/vm/HashedAllocationContext.java	Tue Dec 19 09:05:20 2017 +0900
@@ -18,8 +18,10 @@
 package gov.nasa.jpf.vm;
 
 // see mixinJPFStack() comments
-import sun.misc.SharedSecrets;
-import sun.misc.JavaLangAccess;
+//import sun.misc.SharedSecrets;
+//import sun.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 
 import gov.nasa.jpf.Config;
 import static gov.nasa.jpf.util.OATHash.*;