• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compile Error - J2EE 1.4 SDK  RSS feed

 
Sri Gnana
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have installed J2EE 1.4 SDK and I'm trying to compile the servlet file, but it's showing the compile time error's 1.Package javax.servlet.http does not exist and 2.cannot resolve symbol. I think I didn't set path correctly, can any one help me out and give me the possible way to compile the servlets.If the problem is with the path, please give me the details for setting the path.
 
Gert Cuppens
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This error depends in which environment you are compiling the servlet. Many free IDE's need to know where you've placed the jar-files containing the classes you're using. For example, under Eclipse the classpath variables can be viewed with the menu options Windows - preferences - Java.

If you're using another IDE or even if you're using a DOS box, then it will be different. So, in which environment are you compiling your servlets ?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37249
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sri,
In particular, you need to put one of servlets.jar or j2ee.jar in your classpath. This can be done as a command line switch or in the CLASSPATH environment variable.
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also copy one of the above mentioned jar files to "your jdk directory\jre\lib\ext\"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!