• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Junilu Lacar
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst
  • Peter Rooke
  • Mikalai Zaikin
Bartenders:
  • Himai Minh

"bad class file: .\LogServlet.java" error

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I've upgraded my existing version of MySQL and can run Test.java, and TestServlet.java extends HttpServlet, but when I try TestServlet.java extends LogServlet I get the following errors:
"C:\javaranch>javac TestServlet.java
.\LogServlet.java:7: package LocalSystem does not exist
import LocalSystem.* ;
^
TestServlet.java:5: cannot access LogServlet
bad class file: .\LogServlet.java
file does not contain class LogServlet
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class TestServlet extends LogServlet
^
2 errors"
I've tried adding c:\javaranch\JavaRanchCommon.zip; to the classpath, but it makes no difference; JavaRanchCommon.zip is in c:\javaranch and it does have LocalSystem.class in the root.
Does anyone have any suggestions?
LogServlet certainly used to work OK
All the best,
Kate!!
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kate, I couldn't find the LocalSystem.class in my JavaRanchCommon.zip. Then I did a search and it seems this thread may address your problem. Try download the JavaRanchCommon.zip and see if it helps.

Joyce
[ August 05, 2004: Message edited by: Joyce Lee ]
 
Kate Head
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for that Joyce.
After reading the thread, and relooking at the error message, I thought I'd do a check and see what .java files I had in my "working" directory - and there was LogServlet.java (I'd extracted it while doing Servlets 5 and hadn't removed it)
I deleted it and now everything compiles without problem - and runs OK as well. Phew!
All the best,
Kate!!
 
a fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic