Use OpenJML in Eclipse project that uses JDK different from OpenJDK 1.8

422 views Asked by At

OpenJML is available as Eclipse Plugin (install site http://jmlspecs.sourceforge.net/openjml-updatesite ) and it seems to get installed OK in Eclipse Photon.

But docs say it shall run only on OpenJDK 1.8 and it cannot be any other JDK (say, Oracle JDK). Also it cannot be (OpenJDK) version different than 1.8 (say 1.9).

My Projects in Eclipse all use (Oracle) JDK, besides soon we plan upgrading from JDK 1.8 to 1.9.

Can I setup OpenJML so that it uses its wanted OpenJDK 1.8, while my project uses whatever it needs?

1

There are 1 answers

0
wadoon On

OpenJML builds upon the OpenJDK 1.8 Compiler internally. Of course, you can run OpenJML (with JRE 1.8) and the Java 9 compiler against the same Java sources (outside of eclipse; in a build tool), but OpenJML won't understand new language features (Modules, etc.) or API changes. So you need to stick with Java 1.8 API and features, hence besides of JVM improvements, you don't get any benefit of using Java 9.