The Artima Developer Community
Sponsored Link

Java Answers Forum
Newbie question: How to compile servlet

1 reply on 1 page. Most recent reply: Oct 24, 2002 8:02 PM by Ramu

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Hang Ping

Posts: 2
Nickname: hangping
Registered: Aug, 2002

Newbie question: How to compile servlet Posted: Oct 15, 2002 9:01 PM
Reply to this message Reply
Advertisement
Hi,
I got a test.java servlet in c:\temp subdirectory that needs to be compiled with -classpath option servlet.jar.

My classpath is as follows:
SET CLASSPATH=.;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
My question is:
What would be the exact command to compile the servet. I am running Windows 2000, with J2SE and TOMCAT Apache WebServer.
Thanks in advance for any help.


Ramu

Posts: 29
Nickname: sripoorna
Registered: Oct, 2002

Re: Newbie question: How to compile servlet Posted: Oct 24, 2002 8:02 PM
Reply to this message Reply
hi,

To run a servlet the servlet.jar file should be in the classpath.
my advise is while u r setting the classpath u r reffering to the bin direcotry there is the problem because bin directory is used to set the path not the classpath.
In the classpath u have to set the .jar files etc..

for u r case
u place the servlet.jar file in the c:\temp direcotry
and run the follwoing command

c:\temp>javac -classpath .; test.java

regrads
ramu

Flat View: This topic has 1 reply on 1 page
Topic: from color to grayscale Previous Topic   Next Topic Topic: getch()

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use