Open ebourg opened 6 years ago
Your missing classes are, for as far as I can see after a quick look, (almost) all in what used to be tools.jar. For that, see the Migration Guide documentation for Java 10:
"Removed rt.jar and tools.jar Class and resource files previously stored in lib/rt.jar, lib/tools.jar, lib/dt.jar and various other internal JAR files are stored in a more efficient format in implementation-specific files in the lib directory"
Browse it here: https://docs.oracle.com/javase/10/migrate/toc.htm#JSMIG-GUID-A78CC891-701D-4549-AA4E-B8DD90228B4B
Maybe this is not a problem with Java 10 anymore? I also ran into some issues with old ASM version, but the 6.x releases should support Java 10. I used these steps to successfully build cofoja (ASM 6.x release versions are split into multiple jars, so changed the build/ivy files):
$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13)
OpenJDK 64-Bit Server VM (build 10.0.2+13, mixed mode)
diff --git a/build.xml b/build.xml
index 67a678a..e7df37a 100644
--- a/build.xml
+++ b/build.xml
@@ -177,11 +177,14 @@
provider="${apt.class}" />
<zipfileset includes="**/*.class"
src="@{barejarfile}" />
+ <!--
<zipfileset includes="**/*.class">
<fileset dir="${lib.dir}">
<include name="asm-*.jar" />
</fileset>
</zipfileset>
+ -->
+ <zipgroupfileset includes="**/*.jar" dir="${lib.dir}" />
</jar>
</sequential>
</macrodef>
diff --git a/ivy.xml b/ivy.xml
index d029264..ab2cb07 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -12,7 +12,9 @@
<artifact name="cofoja+contracts" conf="contracts" />
</publications>
<dependencies>
- <dependency org="org.ow2.asm" name="asm-all" rev="6.+" conf="*->default" />
+ <dependency org="org.ow2.asm" name="asm-commons" rev="6.2.1" conf="*->default" />
+ <dependency org="org.ow2.asm" name="asm-tree" rev="6.2.1" conf="*->default" />
+ <dependency org="org.ow2.asm" name="asm" rev="6.2.1" conf="*->default" />
<dependency org="junit" name="junit-dep" rev="[3.8,)" conf="test->default" />
</dependencies>
</ivy-module>
Hi,
I get the following compilation errors with Java 10: