Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

One goal of the JikesRVM project over recent years has been the ability to develop JikesRVM in a development environment such as Eclipse.  This has been possible for the MMTk component since 2005, and as of early 2007 (release 2.9.0) it is possible to work with the majority of the JikesRVM codebase in Eclipse and similar environments.  With Jikes RVM release 2.9.1, setting up your Eclipse environment to work with Jikes RVM became even easier.

Editing JikesRVM in Eclipse

These instructions assume you are working with Jikes RVM version 2.9.1 or later.

  1. Create a JikesRVM source tree either via Mercurial checkout or untar-ing a distribution.


    $ hg clone

  2. Create the machine-generated files and eclipse metadata:
    • If you have a recent version of Jikes RVM (3.0 onwards):


      $ cd jikesrvm
      $ bin/buildit --eclipse localhost

      Note that if you will not or cannot build on your local machine, substitute localhost for the name of a host you can build on (buildit will perform the build remotely and then copy the requisite files back).

    • If you are working on an older version (2.9.1 - 2.9.3), you can follow this procedure:


      $ cd jikesrvm
      $ ant
      $ ant eclipse-project

      If you will not or cannot build on your local machine:

      1. copy your tree to build build host somehow
      2. perform the above ant tasks
      3. copy the following generated files and directories back to the machine you will edit on:
        • jikesrvm/.project
        • jikesrvm/.classpath
        • jikesrvm/eclipse
  3. Import the newly created Eclipse project into your Eclipse workspace.
    1. From Eclipse, select File-->Import
    2. Select "Existing Projects Into Workspace"
    3. Browse to find the top-level directory.
    4. Select the project (in this case JikesRVM ia32-linux development)
    5. Hit Finish

Setup for easier compliance with the Checkstyle rules

If you consider contributing changes back to the RVM, it is helpful to configure your IDE to comply with the Jikes RVM coding style. The coding style forbids the use of tabs and requires that no line ends with whitespace.

If you have a separate workspace for your work with Jikes RVM, you can set up Eclipse for correct tab usage by configuring the text editors. Go to Window -> Preferences and then to General -> Editors -> Text editors (Eclipse 3.6) or Window -> Preferences -> General -> Editors -> Text Editors (Eclipse 3.5 and earlier). Check "Insert spaces for tabs". Make sure that "Displayed tab width" is set to 2. This setting affects the non-Java editors (e.g. XML editor for the ant files for the build).

To set the tab width for Java code, you need to setup the Java code style. We currently do not provide a style template, so you will have to define your own. Go to the project properties (e.g. via Project -> Properties) and select Java Code Style -> Formatter. Check the box "Enable project specific settings" and create a new profile for Jikes RVM. Edit the new profile. In the edit dialog, choose the tab "Indentation". Set the tab policy to "Spaces only" and set both indentation size and tab size to 2. Also make sure that the box "Empty lines" at the bottom of the "Indentation" tab is not checked.

To ensure that you do not introduce whitespace at the end of lines you can configure Eclipse's Save actions in the project properties at Java Editor -> Save Actions. Check the box "Enable project specific settings" and the box "Perform the selected actions on save" as well as "Additional actions". Press "Configure" and check the box "Remove trailing whitespace" in the "Code Organizing" tab.

Editing JikesRVM in NetBeans

  1. Follow the instructions for Eclipse including building the eclipse project with ant
  2. Install the Eclipse project importer
  3. Select File -> Import Project -> Eclipse Project
    1. Choose to import project ignoring project dependencies
    2. Select the top-level directory you created with the JikesRVM in as the project to import
    3. Select a new folder as the destination (workspace) for the import
    4. Hit Finish