Skip to content

JML4 Setup Eclipse, workspace

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

These notes are intended for JML developers willing to test and/or contribute to the JML4 project.

Getting and setting up Eclipse

  • Obtain the latest 3.4.0 version of Eclipse (not 3.4.1 or later) from here or here.
  • Install the Subclipse plug-in, e.g., using the update site: http://subclipse.tigris.org/update_1.6.x (See note ![1].)
  • If you are planning on viewing and/or editing the JDT grammar and you would like syntax highlighting, hyperlinks, etc., then install gedit_1.0.2. Follow the link to get a jar file, then drop the .jar in your Eclipse plugins directory. (See note ![2].)

Setting up your workspace

The following needs to be done every time you create a new workspace.

  • Ensure that your default Java runtime for Eclipse is JDK 1.6, as follows:
    • Navigate to Window >> Preferences >> Java ... >> Installed JREs (or Eclipse >> Preferences >> Java ... >> Installed JREs on OS X).
    • Ensure that you have a Java 6 JDK installed. (This is a JDK, not a JRE.)
    • Select the check box for the jdk1.6 (so that it will be used by default).
  • Ensure that the compiler compliance level is set to 1.6 (Window >> Preferences >> Java ... >> Compiler).
  • [optional] Open the SVN perspective and add a new SVN repository using the URL: https://jmlspecs.svn.sourceforge.net/svnroot/jmlspecs

For more information about JmlSpecs subversion access see here. (This step is optional because importing the project set file mentioned below will create the necessary CVS and SVN repository entries for you.)

Checking out and building JML4

The easiest way to load JML4 and all of the required test files is to:

  • Download the jml4+jdttests.psf project set file. (See note ![3].)
    • When asked for a login and password for the dev.eclipse.org pserver, use login "anonymous" and an empty password.
  • Import this project set file using File >> Import ... Team >> Team Project Set. (See note ![4].)

Notes

  • ![1] If your Eclipse does not have the Mylyn plug-in, then you will want to unselect the "integration with mylar, mylyn, etc" when you get the error concerning the missing org.eclipse.mylar* plug-in. You will have to expand the tree to see the options.
  • ![2] If you relaunch Eclipse and you do not get syntax highlighting (i.e. color) when viewing java.g, then you need to exit and relaunch Eclipse again, but this time add you might have to provide it with the -clean flag.
  • ![3] If you're trying to use Eclipse 3.3 still (not recommended), the 3.3 version of the project set file is jml4+jdttests-3.3.psf.
  • ![4] Sometimes, there is a feature interaction problem with certain versions of Eclipse 3.4 and the Subclipse plug-in such that the projects in a project set file do not load in one go. Here is the workaround in case the problem persists in your environment:
    • Do not check the "Run the import in the background" checkbox. Instead click "Finish", which will load only one svn project.
    • After this project is loaded, click on "Finish" again; when prompted whether you want to replace the already loaded project select "No to all".
    • Repeat this process as many times as needed (which is currently should be 5 or 6, i.e. the number of projects that are under svn).
Clone this wiki locally