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

Servlet compile problems

Rupa Kalidoss
Greenhorn

Joined: Jun 13, 2000
Posts: 2
I have my jsdk.jar set in my classpath
as CLASSPATH=C:\JDK1.1.8\LIB\CLASSES.ZIP;c:\jsdk2.0\lib\jsdk.jar
and my path set to SET PATH=C:\JDK1.1.8\BIN;c:\jsdk2.0\bin
But still i get a compile error of HTTP Servlet not found,when i try compiling my servlet. It is not able to recognize, the jsdk.jar set in my classpath. However my pure java code compiles clean, proving that the compiler is able to pick up the classes.zip file in the same classpath. Then why not JSDK.JAR??
Moreover if i do the following on my DOS prompt, i get a clean compile.
c:\jsdk2.0\examples> javac -classpath "c:\jsdk2.0\lib\jsdk.jar";"c:\jdk1.1.8\lib\classes.zip" SimpleServlet.java
Why is this happening?,if it can recognize jsdk.jar here,why not when the same thinng is in the classpath.
I cannot see any logical reasoning to this
need help!!!1
Vikram Deshmukh
Greenhorn

Joined: Apr 22, 2000
Posts: 29
Hi Rupa,
The same prob i encountered few days ago . Initially i did the same thing as u did by taking classpath option with javac. Solution to this, whatever classpath u've in ur Autoexec.bat , give it a prefix of set , i.e. ,
set classpath = c:\jsdk2.0\lib\jsdk.jar;
Run the autoexec .
let me know if it works at ur place, since i've no reason , why after prefixing "set" it works ?
from ,
vikram .
Rupa Kalidoss
Greenhorn

Joined: Jun 13, 2000
Posts: 2
it still does not work!!!1
i went to the autoexec file and prefixed classpath with SET
and it now looks like set classpath=c:........
is there something else i should do?//
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
Well, I'm not working with 1.1.8 and the JSDK, but since the servlet classes are all "standard extensions" shouldn't the jsdk.jar be in the /lib/ext/ directory.
Jar files in that directory are automatically included with Java 1.2 - I don't remember if this is true about 1.1.8
Vikram Deshmukh
Greenhorn

Joined: Apr 22, 2000
Posts: 29
well , i actually havent seen the fact that u r using JDK 1.1.8.
Since i've heard , well not experienced, u must have JDK 1.2.2 , thats what i'm using .
If u get JDK 1.2.2-win install it, & try , if it works as i suggested, then let me know ,
bye ,
from,
vikram .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet compile problems