aspose file tools*
The moose likes Servlets and the fly likes package and classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "package and classpath" Watch "package and classpath" New topic
Author

package and classpath

Shuaib Gill
Ranch Hand

Joined: May 29, 2001
Posts: 62
Hi folks,
Suppose I have some code which starts off with....
import java.io.*;
import java.util.*;
.
.
.
import com.oreilly.servlet.MultipartRequest; // user defined
// java code goes here...
How do I change my Java environment in order to compile and run this program since the package I am importing is user defined? Do I have to change my classpath, or should I put this package in a certain file directory on my hard drive? Any help would be greatly appreciated.


programmer77
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12836
    
    5
One approach would be to put the extra classes where the servlet engine will look for them when your servlet is running, then set your classpath to point to that location. If you are using an IDE like Visual Cafe, you can include that path as part of the project instead of setting the classpath environment variable.
Bill
 
 
subject: package and classpath