|
-
May 30th, 2003, 08:30 PM
#1
Thread Starter
Hyperactive Member
Java Compiler
I am trying to learn Jakarta Tomcat to do some JSP programming. I have downloaded the JKD 1.4 and Tomcat 4.2 to do this JSP, i have installed all the software and my Tomcat server is working, my JSP example scripts work.
But when i go to compiler one of my .java documents to get the .class file it doesnt want to work. Here is what i am doing. And the errors that I got. What can i do to fix this.
D:\j2sdk1.4.1_03\bin>javac HelloServlet.java
HelloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
HelloServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
HelloServlet.java:13: cannot resolve symbol
symbol : class HttpServlet
location: class HelloServlet
public class HelloServlet extends HttpServlet {
^
HelloServlet.java:14: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloServlet
public void doGet(HttpServletRequest request,
^
HelloServlet.java:15: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloServlet
HttpServletResponse response)
^
HelloServlet.java:16: cannot resolve symbol
symbol : class ServletException
location: class HelloServlet
throws ServletException, IOException {
^
6 errors
D:\j2sdk1.4.1_03\bin>
Thanks to all that reply
-
May 30th, 2003, 09:40 PM
#2
Thread Starter
Hyperactive Member
I have also double checked to make sure that my classpath is pointing to the servlet.jar file, but for some reason it doesnt want to work.
I have even gone so far as to unzip the jar file onto my harddrive. Now there is a physical copy of the .jar file in my D:\javax folder.
Please help me fix this.
-
May 31st, 2003, 11:07 AM
#3
I think you need to add servlet.jar to your classpath for when you compile. Have you done that?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jun 1st, 2003, 11:03 PM
#4
Thread Starter
Hyperactive Member
Yes, my servlet.jar is in my classpath, i made sure. Also I check in my dos prompt by typeing the set command and in the classpath it is pointing to the the jar file.
I even unzipped the jar file onto my harddrive and it compiler once but that was it.
Thanks for the help
-
Jun 2nd, 2003, 11:32 AM
#5
Thread Starter
Hyperactive Member
Well for some reason it works now, so dont worry about this. I just deleted the classpath and then retyped it and it works fine now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|