Converting an existing project to an Java ME project

If you have an existing Java project that you want to convert into an Java ME project, you can do this by selecting Convert to Java ME Project from the project pop-up menu.

When you do this, the MTJ plug-in will automatically prompt you for the appropriate device definition, and will then make the required changes to your project.

If a Java SE project is converted to an Java ME project, the Java SE libraries need to be removed from the build path. If MTJ can identify these libraries, it will remove them automatically. If MTJ does not remove the J2SE libraries, you will need to do this yourself.

MTJ also handles adding the appropriate Java ME libraries to your project automatically. The specific libraries added are based on the selected device definition. If you were using Eclipse to do Java ME programming prior to converting your project to use MTJ, your project may still have the Java ME libraries in the build path. If so, you need to remove them. Failure to do this may cause problems, since MTJ may misinterpret these libraries as additional classes that need to be bundled into your JAR file.