View Full Version : [ubuntu] Compling servlets

March 1st, 2011, 01:04 PM
Hi guyz i just a got a problem in compiling the servlet files in java. using javac

javac MyServlet.java

it give me errors, i understand the error and now i compiled it with

javac MySerlvet.java -classpath=/usr/local/tomcat/lib/servlet-api.jar

I want to add this api.jar file to my path, so every time i compile the code using javac , i should not use the -classpath,

tell me the way how to use it in global

March 1st, 2011, 01:55 PM
If I were you I would use netbeans or eclipse which will sort the paths for you.