Your Account
Hear us Roar
I created the subdirectory com\onjava and tried to compile com.onjava.login.java from there. I get a compile error:
com.onjava.login.java:8: class login is public, should be declared in a file named login.java
public class login extends HttpServlet {
^
1 error
Stuck so early on, too! Please help...and if anyone can give me a step-by-step of how to set classpath (Tomcat? Java?) to not create that problem with the HttpServlet thing, as many people have asked, I would be really grateful. I'm currently compiling all code like this:
~>javac -classpath ".;C:\Project\Apache Tomcat 4.0\common\lib\servlet.jar" nameoffile.java
Thanks to anyone who can spare a minute for a confused newbie.
© 2014, O’Reilly Media, Inc.
(707) 827-7019
(800) 889-8969
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.