Developing with Mika

Using Mika in Eclipse

Note: the "eclipse" version of Mika is really just a Mika build which "fakes" a standard JRE. It can probably be used with other Java IDEs as well, not just Eclipse ...

There is a special Mika distribution for use with eclipse. You can install this on your machine and add it as an installed JRE in eclipse. You can then set Mika as the jre to use for a project (to compile against and to run on).

Important Note: This package is only useable on x86 linux machines. It will not work on Windows systems!

Installing mika:

Download the latest version of mika-eclipse from http://www.k-embedded-java.com/mika/eclipse/. Untar the mika-eclipse-x.y.z.tar.gz file on your filesystem. To install mika as a JRE in eclipse:

  1. From the menu bar, select Window > Preferences.
  2. In the left pane, expand the Java category and select Installed JREs.
  3. Click the Add... button. The Create JRE dialog opens.
  4. In the JRE type field, select "Standard VM" from the drop-down list.
  5. In the JRE name field, type a name for the new JRE definition. All JREs of the same type must have a unique name. We recommend you use Mika.x.y-z as name.
  6. In the JRE home directory field, type or click Browse to select the path to the mika-x.y-z directory, which contains the bin and lib directories of Mika. Eclipse will check this automatically to make sure it is a valid path.
  7. Click OK when you are done.

Mika will be listed next to all other installed JREs.

For a project which should run on Mika, you need to tell the Java compiler to produce code for a 1.4 VM. Right-click on the project in the explorer and select "Properties > Java compiler". Enable project specific settings, set "JDK Compliance" to 1.4, and use the default compliance settings for this level. To run on Mika, go to the JRE tab of the "Run..." menu, select "Alternate JRE", and pick Mika from the pop-up list of "Installed JREs".

These instructions are based on the Eclipse 3.1 help pages. They might be different for later versions of eclipse. Please read the Eclipse help topic "Adding a new JRE definition" and related topics for more details .