Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to compile java file

 
Sabber bhatia
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone

i am not being able to complie java file having java.servlet.http.*
i installed jdk 1.5,jre for that and tomcat
please tell me what is the problem

thanks
Sabeer bhatia
 
Vishal Matere
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
servlet-api.jar needs to be in classpath.
Can you please be very specific if it's java.servlet.http or JAVAX.servlet.http ?

Vishol
[ April 22, 2008: Message edited by: Vishal Matere ]
 
Vilmantas Baranauskas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, to compile java sources, you need jdk, not jre.

Second, it is javax.servlet.http.*, not java.servlet.http.*.

Third, how do you try to compile it - command line or IDE?

In any case, you need to include servlet-api.jar in your classpath. It can be found at tomcat/common/lib/servlet-api.jar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic