1

Help with setting classpath in .bashrc (error: package javax.servlet does not exist)

view story
linux-howto

http://forums.fedoraforum.org – Hi, While I'm trying to compile a simple servlet program, on typing the below command: #javac A5SA3.java I get the error mssg as: #A5SA3.java:9: error: package javax.servlet does not exist #import javax.servlet.*; ^ After doing a bit of google search, I found out that the classpath is incorrect. So when I compile with cmd: #javac -cp $CLASSPATH:/usr/share/java/tomcat-servlet-api.jar A5SA3.java The program gets compiled perfectly. So I tried setting the class path in .bashrc(below are contents of my .bashrc file) 1 # .bashrc$ 2 $ 3 # User specific (HowTos)