Adding servlet.jar to the CLASSPATH in JCreator

There are two ways to do this. The first way is to create a new project. Then every file you create in this project will use the correct CLASSPATH, but you will always need to open this project and create your .java files in it.

  1. Open a New project
  2. Select the Project menu
  3. Select Project Settings
  4. Select Required Libraries
  5. Select Add
  6. Select Archive
  7. Browse to find
    c:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar
  8. Give the library a name. This is only for reference inside of JCreator.
  9. Make sure the check box is checked
  10. Look at the class path to verify that servlet.jar is included.

If you want to change the path for all pojects and files, do the following

  1. Select the Configure menu
  2. Select Options...
  3. Select JDK Profiles
  4. Select the first profile listed
  5. Click Edit
  6. You will see a list of all the elements in your current path
  7. Click Add
  8. Click Archive...
  9. Browse to find
    c:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar
  10. Click OK until you are done.

Deploying .class files to a different directory

It is annoying to have to copy .class files from the default JCreator directory to the appropriate classes directory. It is possible to change the destination directory so that the .class files are created in the classes directory. There are two ways to do this.

The first way is to create a new project, or to modify an existing one.

  1. Select an existing project or create a new one.
  2. Select the Project menu
  3. Select Project Settings
  4. Select Output Path
  5. Select Browse
  6. Browse to find the directory where you want the .class files to be placed.
  7. Click OK.
  8. Be sure to save your project settings when you close JCreator.

The second way is to modify the default project External Files. If you do not create files in a project, they are placed in the External Files project.

  1. Select External Files in the Workspace window.
  2. Select the Project menu
  3. Select Project Settings
  4. Select Output Path
  5. Select Browse
  6. Browse to find the directory where you want the .class files to be placed.
  7. Click OK.
  8. Be sure to save your project settings when you close JCreator.