File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes how to compile java file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to compile java file" Watch "how to compile java file" New topic
Author

how to compile java file

Sabber bhatia
Ranch Hand

Joined: Jun 27, 2006
Posts: 59
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

Joined: Jan 22, 2008
Posts: 81
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 ]

SCJP <br />SCWCD <br />SCBCD <br />SCEA-1
Vilmantas Baranauskas
Ranch Hand

Joined: Dec 20, 2006
Posts: 89
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.


Author of <a href="http://www.newsinjector.com" target="_blank" rel="nofollow">NewsInjector</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to compile java file