Configuring the Eclipse classpath variables and the Elipse Tomcat Plugin

In Eclipse, you must set the classpath variables and configure the Eclipse Tomcat Plugin.

Procedure

Set the classpath variables:

  1. In Eclipse, go to Window > Preferences > Java > Build Path > Classpath Variables.
  2. Click New, enter the following information and click OK.
    • Name J2EE_JAR
    • Path
      • The path to the JAR file of your Java EE implementation. For example, for WebSphere Application Server, enter: C:\IBM\WebSphere\AppServer\lib\j2ee.jar
      • For examle, for WebLogic Application server, enter:C:\Oracle\Weblogic\wlserver\server\lib\wlfullclient.jar
  3. Click New, enter the following information and click OK.
    • Name JAVAMAIL_HOME
    • Path The folder that contains mail.jar and activation.jar files for your Java EE implementation.
      Note:

      If your version of Java EE does not contain these files, you can download JavaMail API and Java Activation Framework (JAF) from the Oracle website and copy the files to any folder, for example C:\Tools\JAVA_MAIL. Then, configure JAVAMAIL_HOME to point to that folder.

  4. Click OK to save the preferences.

Configure the Eclipse Tomcat Plugin:

The plugin adds a toolbar and various menu options to Eclipse for configuring and using Tomcat.

  1. In Eclipse, go to Window > Preferences > Tomcat.

    If you don't see Tomcat in the high-level preferences tree, then you might have the wrong Tomcat plugin, or it might not be installed properly, or you might need a clean Eclipse start.

  2. Select the appropriate Tomcat version. For example, version 7.x.
  3. Set Tomcat home to where you extracted the downloaded archive
    For example, C:\Tools\Tomcat\apache-tomcat-7.0.65.
  4. Select JVM Settings and in the Append to JVM Parameters field, enter -Xmx1024m.