Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

STEM Eclipse Setup Old

Revision as of 13:33, 31 March 2011 by Kaufman.almaden.ibm.com (Talk | contribs) (Installing Features from the Galileo Discovery Site)

STEM Contents Page

STEM Eclipse Setup

Introduction

The current STEM code-base is built on Eclipse 3.5 (Galileo). We strongly recommend installing the very latest build of Eclipse 3.5 or higher. Note that multiple versions of Eclipse can be installed concurrently. So if you have other projects that require other versions of Eclipse, this is not a problem. We try to stay current with the latest version of Eclipse so if this documentation gets out of data please don't hesitate to try the latest (3.5 or higher).

Eclipse comes as a zip file Eclipse-build-id.zip. Eclipse does not come with an installation program, as many Windows application do. Instead all that is needed to install Eclipse is to unzip the contents of the downloaded file. All of the Eclipse application is under the eclipse directory found in the zip file. Where the file is unzipped to is up to you. Internally Eclipse uses relative paths, and path variable to find things, which allows the application itself to be installed anywhere you like.

In the examples below, we will assume this is Windows XP and use the directory C:\eclipse, but as said you can do otherwise if you like. On Linux this might be /var/eclipse

Eclipse 3.5 installation

  • Create the directory C:\eclipse. This will be parent directory for this Eclipse SDK installation and for all later versions of eclipse. It will also be the parent directory for an alternative common installation directory for eclipse features and plug-ins.
  • Create the Eclipse workspace “c:\stem”. The directory "c:\stem" will contain the Eclipse “workspace” for the STEM project. There is nothing special about this directory, you can use c:\workspace or any other that makes sense to you (though don't use the default one in the eclipse installation directory as that will cause problems later when moving up to later versions of eclipse). For consistency, we'll use c:\stem throughout the documentation.


  • Download the latest Eclipse 3.5 (Galileo) release from [1] eclipse downloads and save it in a temporary location (e.g., the desktop). You are given the choice of different levels of Eclipse support. You should select Eclipse for RCP/Plug-in Developers
  • Unzip the latest build file and extract the contents to the sub-directory created previously c:\eclipse. You now have a new subdirectory c:\eclipse\eclipse.
  • Rename the new sub-directory to c:\eclipse\eclipse3.5 to reflect its version number.
  • Open the directory c:\eclipse\eclipse3.5 in the windows explorer, right click on the eclipse.exe icon and create a Windows “short cut”. Drag the short-cut to either the desktop or to the Windows quick launch bar.
  • Right-click on the short-cut icon and edit the “Target” field to specify the Eclipse executable and up to three command line arguments:
    • C:\eclipse\eclipse3.5\eclipse.exe
    • -data <workspace> The directory that is the eclipse “workspace” to use when starting eclipse from this icon. This is where you would point to c:\stem. If you have multiple Eclipse workspaces, then do not specify it here and you will be asked to choose the workspace at startup.
    • -vm <path> The specific Java virtual machine to use to run eclipse when started from this short-cut. This helps to make sure that there no problems arising from confusion over exactly which JVM is being used.
    • -vmargs <args> Arguments to be passed to the JVM to specify such things as the initial and maximum heap sizes to be used by the JVM when running eclipse. The maximum heap size is most important. We'll use 256 and 800 Megabytes in our example, the default for eclipse is 40 and 256 Megabytes respectively which is too small for STEM. Use values make sense on your machine.
    • The resulting Target field might be:
C:\eclipse\eclipse3.5\eclipse.exe
-data c:\stem 
-vm C:\Progra~1\IBM\Java50\bin\javaw.exe 
-showlocation -vmargs -Xmx800M
  • ClickOK when finished with the edits.
  • Click on the eclipse short-cut and you should be greeted by the eclipse welcome page. Congratulations! If not, there could be problems with the Java installation, perhaps you don't have Java installed or it is not the correct version. Open a command line window and type: " java -version" It should report version 1.5 or higher.
  • If you are reinstalling Eclipse, then you may get notified of errors because your workspace uses features that are not yet installed. Don't worry, the next step should fix this!

The next step is to tell the system where you have installed Eclipse so that some required ANT scripts can run correctly. You can do this by either defining the ECLIPSE_HOME system environment variable or by defining the eclipse internal ANT variable eclipse.home2.


  • Define Ant variables eclipse.home2 to point to your eclipse installation folders.
    • Select Windows->preferences->ant->runtime->properties
    • Select add properties
      • Name: eclipse.home2
      • Value: c:\eclipse\eclipse3.5
  • To specify the Java memory size values:
    • Select Windows->preferences->java->Installed JREs
    • Select jdk1.5...
    • Select Edit
    • Enter -Xms256M -Xmx512M for Default VM Arguments:

The next step is to install additional eclipse features necessary for development.

Installing Features from the Galileo Discovery Site

Many of the additional plugins that are required by STEM are available at the Galileo Discovery Site ]

  • Start Eclipse
  • Select Help→Software Updates→Find and Install...
  • Select search for new features to install and click on Next.
  • Select the Galileo Site http://download.eclipse.org/releases/galileo and click on Finish
  • Accept the mirror sites as they are presented or pick one that is closer, then click “OK”
  • In the window labeled “Select the features to install:” expand the tree. We recommend that you install the the following features one at a time.
  • Click "Select Required" to cause all requirements to be resolved. In each case this will allow Eclipse to automatically add any required plugins.
    • Under Modeling You need to install the Eclipse Modeling Framework (EMF) sdk. This is required.
    • Under Modeling You will ALSO need to install the Graphical Editing Framework Zest Visualization Toolkit SDK. This is required.
    • Click “Next”
    • Accept the terms in the license agreement and click “Next”
    • Click "Finish"
    • Restart Eclipse
    • Under Business Intelligence, Reporting, and Charting You need to install BIRT, the Business Intelligence and Reporting Tools
    • Click “Next”
    • Accept the terms in the license agreement and click “Next”
    • Click "Finish"
    • Restart Eclipse
    • If it's not already installed, add the Graphical Editors and Framework GEF
    • Restart Eclipse

The specified features will be downloaded and then you will be prompted to install them.

The next step is to install other optional eclipse plug-ins for project development.

Installing Additional Eclipse Features

One of eclipse's outstanding features is its extensiblity by additional features and capabilities by adding plug-ins. We use that ability in this step to add additional features for STEM development

  • When installing Eclipse for the first time:
    • Create the following directory: C:\eclipse\eclipse-contrib\eclipse
    This directory will contain an extension location which will simplify the migration from one version of eclipse to the next by making it simple to reinstall the necessary libraries, features and plug-ins to the new version.
    • Define the new “Extension Location”.
      • Create an empty file at C:\eclipse\eclipse-contrib\eclipse\.eclipseextension This marks that directory as an eclipse extension location.
      • Start Eclipse
      • “Help→Software Updates→Manage Configuration”
      • Right click on “Eclipse SDK” and select “Add→Extension Location”.
      • Select the directory C:\eclipse\eclipse-contrib\eclipse”
      • Click “Yes” when asked to restart eclipse.


Now you will be installing new Eclipse components and features into this extension folder. You will then be able to install a new version of Eclipse and simply by specifying the Extension location, you will pick up all of your previous extensions. As you install new features, be sure that you take the option of installing into the Extension location.

Reinstalling Eclipse and optional features

If you followed our instructions for placing optional features into the eclipse-contrib subdirectories, then the reinstallation is very easy.

  • After reinstalling Eclipse as described above:
    • Start Eclipse
    • “Help→Software Updates→Manage Configuration”
    • Right click on “Eclipse SDK” and select “Add→Extension Location”.
    • Select the directory C:\eclipse\eclipse-contrib\eclipse”
    • Click “Yes” when asked to restart eclipse.
    • It should now have reinstalled any features that you previously installed in the eclipse-contrib subdirectories.

There are also some other things that you might need to take care of after reinstalling a new version of Eclipse.

  • Workspace selection
    • Instead of specifing the workspace by the "data" parameter on the shortcut, you may specify what workspace you want to use from a startup prompt. If so you will notice that it has forgotten the list of known workspaces. You can edit c:\eclipse\eclpse3.2.0\configuration\.settings\org.eclipse.ui.ide.prefs and copy the values from this file in your old version.
    • It may have not transfered all of your options. You will probably at least have to change the Java compiler version. Go to window->preferences->java->complier and specify 5.0 for Complier compliance level.


UMLet (Optional}

The project uses UML to document its design. There are many UML tools available, some powerful, some simple, some proprietary, some free. We have selected “simple” and “free” as the most appropriate choice for the project. The goal is to quickly enable developers to be able to draw and edit UML class diagrams. The “UMLet” eclipse plug-in does exactly that. For more information on UML see the book UML for Java Programmers (see the Books section of this document for a reference).

This isn't a critical part of the development process unless one is updating the UML diagrams of the EMF models in org.eclipse.ohf.stem.core so you can skip this step if you wish.

The UMLet plug-in does not have an “update site” that eclipse can use to do the installation. This is no problem, we'll download the zip file and create our own local installation site.

  • Download the UMLet zip file The current version is 7
  • Unzip the UMLet zip file to the plugins directory for the Eclipse Extension that you defined earlier. (e.g. \eclipse\eclipse-contrib\eclipse\plugins)
  • Restart Eclipse.
  • Verify the UMLet plug-in has been installed.
    • “Help→Software Updates→Manage Configuration”, the new location will be listed, but since the UMLet plug-in is not a feature it is not listed.
    • “Help→About Eclipse SDK”→Plug-in Details”.
    • Scan the list (the “provider” is www.umlet.com) and you'll likely find it at the bottom.

Installing or updating Optional Eclipse Plug-ins

It is very simple to install or update Eclipse plugins.

Most are distributed as zip files.

  • Download the new or updated plugin as a zip file.
  • Verify that the top level directory in the zip file is eclipse/plugins or eclipse/features.
  • Unzip the file into c:\eclipse\eclipse-contrib\.
  • Restart Eclipse.

Other plugins use the Eclipse update facility like Galileo which was described earlier and you have hopefully already installed. You can use the Galileo instructions as a model for how to install other plugins that use an update site to distribute updates.

Installing Jdraw

Jdraw is a tool for editing icons.

http://www.j-domain.de/homepage.php?page=20

Installing Tomcat web Server as an Eclipse Plugin

Tomcat is a web Server that can either be run external to Eclipse or as an Eclipse plugin. To install it as a plugin, see the following instructions:

http://plato.acadiau.ca/courses/comp/dsilver/2513/EclipseAndTomcatTutorial/

There is also a version of Tomcat embedded inside of Eclipse that is used for the Help system. The following article discusses how to use it within an application.

http://www.eclipsezone.com/eclipse/forums/t62852.html

You will normally use the embedded Tomcat and have no need for the external version.

Back to the top