Add support for Java 9+
This Merge Request aims to update DiSL in order to support the latest versions of Java, such as Java 9, 10, 11, 12 and 13.
ant uses now the Java version defined by the host machine and changes command-line parameters accordingly based on it. The same happens in test runners and in the Python script to run the examples. Runtime checks are also performed into the agent.
Here is a list of changes and new implementations that have been done to achieve this goal.
jniheaders have been updated.
protobuf-javasince the first causes compilation error using Java 9+ (https://github.com/protocolbuffers/protobuf/pull/6699).
- As the release notes underline: "The default behavior has changed so that the ClassFileLoadHook event is not sent during the primordial phase". This means that some classes are not processed as before since the callback of this event is the one responsible to instrument the code. For this reason, a new capability
can_generate_early_class_hook_eventshas been handled.
-Xbootclasspath/phas been removed and replaced with a new option
- Because of the new module system and the removal of
-Xbootclasspath/poption, adjustments to the
BypassCheckclass visibility needed to be done. It is now patched into the
java.basemodule and the agent is responsible to make it visible to all other modules in the application during class file loading (using
- Python script has been updated to use the new command-line options (
Continuous integration has been modified to use also Java 9, 10, 11 and 12 with OpenJDK, since the old image has no updates available and Oracle JDK has been relicensed. The new images are implemented in the
docker folder and have been published on the docker hub (mbasso/disl-ci) instead of the gitlab registry (gitlab.ow2.org:4567/disl/disl/disl-ci). This is because access and publish permissions are needed, so external collaborators cannot do it.