Skip to content
John L. Singleton edited this page Dec 2, 2015 · 1 revision

OpenJIR

OpenJIR is an experimental version of [OpenJml] supporting the embedding of JML specifications into class files in the form of [JIR].

Users

Notes for developers

Preparation

Outside of Eclipse:

  • Ensure you have OpenJDK6 installed. As of March 2010, the only way to get OpenJDK6 is as a precompiled binary. There is quite a bit of activity on MacPorts ticket #20956 in early November 2010 attempting to fix this problem.
  • Download the OpenJIR src+distribution bundle from this distribution folder: jmlspecs/files/JIR/OpenJIR/.
  • Unzip and untar the bundle; this will result in a directory named "openjir".
    • Inside the src folder, unzip and untar the src bundle.

Eclipse Setup: OpenJIR project (only)

The OpenJIR distribution is self-contained. It can be used by end-users outside of Eclipse and by developers who wish to load OpenJIR as a project inside Eclipse.

In Eclipse, when working from a new workspace:

  • Under the Preferences:
    • Team >> SVN: set the "SVN interface" to "SVNKit (pure Java)".
    • Java >> Compiler: set the JDK Compliance to 1.6.
    • Java >> Installed JREs:
      • Set "JVM 1.6.x" as your default JRE.
      • Add a "MacOS X VM" named "JVM OpenJDK6" linked to your OpenJDK6 directory. We typically bind this to the execution environment named "JavaSE-1.6".

Setting up the "openjir" project in Eclipse:

  • Create a new project from "openjir": i.e. invoke "New Project" >> "Java Project" >> Create project from existing source: select the openjir folder created earlier.
  • Open the openjir project properities and ensure that:
    • The Java compiler compliance level is set to 1.6.
    • The Java Build Path >> Libraries >> JRE System Library: as an "Alternate JRE" select "JVM OpenJDK6" or change the project's execution environment.

Eclipse Setup: bringing in OpenJML and the other JIR projects

Clone this wiki locally