Skip to content

Commit

Permalink
Nopol supports java 17 (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus authored Aug 8, 2024
1 parent 70e9989 commit 04e8c9a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v2
with:
java-version: 11
java-version: 17
distribution: 'adopt'

- name: Set up Maven
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ Others papers about Nopol:

Nopol requires Java and an SMT solver installed on the machine (e.g. Z3)

Up to commit 80130c4c, Nopol required Java 8. Now it also works on Java 11, see https://github.com/SpoonLabs/nopol/pull/214
Java version:

* From 2013 to 2021, Nopol required Java 8.
* From Nov 19, 2021, Nopol works on Java 11, see https://github.com/SpoonLabs/nopol/pull/214
* From August 8 2024, Nopol works with Java 18, see https://github.com/SpoonLabs/nopol/pull/234

0) NoPol uses the `com.sun.jdi` that lives in `tools.jar`. Identify where `tools.jar` is and add the depencency in `pom.xml`

Expand Down
4 changes: 2 additions & 2 deletions nopol/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

To run the tests:

* install a JDK, and ensure that maven uses it
* install a JDK, see expected version in ../README.md, and ensure that maven uses it
* check that `z3` works well on the command line (`$ lib/z3/z3_for_linux``) (see TestUtility.java: private String solverPath = "lib/z3/z3_for_linux";)`
* first run `mvn test -DskipTests` in `../test-projects/`. This creates `../test-projects/target/test-classes` (but doesn(t run the tests since the examples are buggy)
* first run `mvn test -DskipTests` in `../test-projects/`. This creates `../test-projects/target/test-classes` (but doesn't run the tests since the examples are buggy)
* then `mvn test`
5 changes: 4 additions & 1 deletion nopol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<configuration>
<argLine>-Xms2048m -Xmx2048m -cp ${java.home.openjdk11}/jmods/jdk.jdi.jmod</argLine>
<!-- java.lang.RuntimeException: java.lang.reflect.InaccessibleObjectException: Unable to make abstract boolean com.sun.tools.jdi.ReferenceTypeImpl.isAssignableTo(com.sun.jdi.ReferenceType) accessible: module jdk.jdi does not "opens com.sun.tools.jdi" to unnamed module -->
<!-- java.lang.IllegalAccessError: class fr.inria.lille.repair.expression.value.Value$1 (in unnamed module @0x5577140b) cannot access class sun.reflect.generics.reflectiveObjects.NotImplementedException (in module java.base) because module java.base does not export sun.reflect.generics.reflectiveObjects to unnamed module @0x5577140b -->

<argLine>-Xms2048m -Xmx2048m -cp ${java.home.openjdk11}/jmods/jdk.jdi.jmod --add-opens jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 04e8c9a

Please sign in to comment.