In Eclipse, you must set the classpath variables and configure the Eclipse Tomcat
Plugin.
Procedure
Set the classpath variables:
- In Eclipse, go to
.
- 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
- 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.
- 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.
- In Eclipse, go to
.
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.
- Select the appropriate Tomcat version. For example, version 7.x.
- Set Tomcat home to where you extracted the downloaded archive
For example,
C:\Tools\Tomcat\apache-tomcat-7.0.65.
- Select JVM Settings and in the Append to JVM Parameters field,
enter -Xmx1024m.