Removing the MTJ plug-in

Obviously we hope that you find MTJ so useful that you will never want to be without it. If you really feel you need to remove it, however, or if you want to do a completely "clean" install, you can follow these steps to remove MTJ from your Eclipse installation:

  1. The "Normal" way
  2. The "Brute Force" method
  3. Removing MTJ traces from a project

The "Normal" way

The most straightforward way to remove MTJ is to use Eclipse's configuration management.

  1. From the Eclipse Help menu, select Software Updates and then Manage Configuration...

  2. You will be presented with the following dialog:
    screenshot
    Expand the entry in the left pane for your Eclipse installation directory and click on the entry for MTJ.

  3. At this point, the dialog should look something like this:
    screenshot
    Click on the Uninstall link in the right pane.

  4. Eclipse will ask you to confirm that you want to uninstall MTJ. Answer "Yes", and MTJ will be removed. Note that Eclipse will have to restart the workbench after the uninstall so that it can update its feature and plugin metadata.

  5. If you have chosen to install the preprocessor support using the instructions, Eclipse will not remove the hooks necessary for the preprocessor. To uninstall, the preprocessor hooks:

    1. Locate the file config.ini. This file is located in the <eclipse install>/configuration directory.
    2. Edit the config.ini with your favorite text editor.
    3. Remove the property definition
      osgi.framework.extensions=org.eclipse.mtj.core.hooks
      from the configuration file.
    4. Save the configuration file.
    5. Restart Eclipse.
    6. Delete the org.eclipse.mtj.core.hooks plugin from your file system.
  6. If you have any of the optional MTJ features (such as the Siemens feature) installed, Eclipse will require that you uninstall them before uninstalling MTJ itself. In this case, it is OK not to restart the workbench between uninstalling the feature and uninstalling MTJ itself.

Note that removing MTJ using this technique will remove the current version of the MTJ feature and plugins from your Eclipse installation directory. If you updated MTJ from an older version, the plugin and feature directories for the older versions will still be present inside your Eclipse directory. If you really want to remove all vestiges of MTJ, you can get rid of those directories using the "Brute Force" method below.

The "Brute Force" method

If the "Normal" method doesn't work, or if you want to make absolutely sure that everything is gone, you can always remove MTJ the "brute force" way:

  1. Close any running copies of Eclipse.
  2. Open the features directory within your Eclipse installation directory.
  3. Delete any directories whose name begin with "org.eclipse.mtj". (e.g. org.eclipse.mtj.feature_0.6.1)
  4. Open the plugins directory within your Eclipse installation directory.
  5. Delete any directories whose name begin with "org.eclipse.mtj". (e.g. org.eclipse.mtj.core_0.6.1, org.eclipse.mtj.docs_0.6.1, etc.)
  6. If you have chosen to install the preprocessor support using the instructions, Eclipse will not remove the hooks necessary for the preprocessor. To uninstall, the preprocessor hooks:

    1. Locate the file config.ini. This file is located in the <eclipse install>/configuration directory.
    2. Edit the config.ini with your favorite text editor.
    3. Remove the property definition
      osgi.framework.extensions=org.eclipse.mtj.core.hooks
      from the configuration file.
    4. Save the configuration file.
  7. Invoke eclipse using the -clean command line option. This will force Eclipse to re-scan its lists of installed features and plugins in order to ensure that the appropriate updates to Eclipse's metadata are performed.

Removing MTJ traces from a project

If you want to remove all traces of MTJ from a project, you need to do the following from outside Eclipse:

  1. MTJ creates a file named .mtj in the root of each MIDlet project. Remove this file.
  2. MTJ adds a build command and a "nature" to the .project file associated with each Eclipse project. A typical Eclipse .project file looks like this:
    <xml version="1.0" encoding="UTF-8"?>
    <projectDescription>
    	<name>PaperClick Java Go Window</name>
    	<comment></comment>
    	<projects>
    	</projects>
    	<buildSpec>
    		<buildCommand>
    			<name>org.eclipse.jdt.core.javabuilder</name>
    			<arguments>
    			</arguments>
    		</buildCommand>
    		<buildCommand>
    			<name>org.eclipse.mtj.core.preverifier</name>
    			<arguments>
    			</arguments>
    		</buildCommand>
    	</buildSpec>
    	<natures>
    		<nature>org.eclipse.jdt.core.javanature</nature>
    		<nature>org.eclipse.mtj.core.nature</nature>
    	</natures>
    </projectDescription>
    The underlined items are the ones you should remove.