offbynull/coroutines

Make compatible with Java 9

offbynull opened this issue · 2 comments

Ensure Java 9 doesn't introduce any new instructions

Running with Java9 failed.

Project jigsaw is the problem. Java9's container format for core java classes (e.g. java.lang.Object) is no longer a JAR (rt.jar), but a new format that according to the JEP (JEP220) is "implementation-specific" and "subject to change without notice". As such, we can't end up reading in core classes in Java9 the same way we do for previous versions of Java.

The way to fix this is to force people using the instrumenter on to Java9, and then use Java9's new jrt:/ URL in conjunction with NIO2 to read core classes (http://openjdk.java.net/jeps/220). Since the Java API is backwards compatible, everything should be fine for older versions.

Keep this ticket open until Java9 is out of early access and related tooling (findbugs, etc..) have been upgraded to work with it. After that's done, make the relevant changes.

Made compatible with Java9 and Java10.