java - Javac erroring out when compiling Servlet libraries -


i using ubuntu , have set paths following:

java_home=/usr/local/jdk1.6.0_24 export classpath=/usr/local/tomcat/lib export java_home 

i thought put servlet libraries in compile path, still getting compile errors this:

package javax.servlet not exist     [javac] import javax.servlet.servletexception; 

any ideas how fix or doing wrong? general java libraries seem working fine.

with jar files, specifying directory containing jar files not work. have 2 options:

  1. specify each jar file individually on classpath:

    export classpath=/usr/local/tomcat/lib/servlet-impl.jar:/path/to/another.jar 
  2. since you're using java 6, should able use wildcards (to include jars in directory):

    export classpath=/usr/local/tomcat/lib/* 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -