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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Class Path error Help

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
class TestMyThread extends Thread {


}

****************************************************************************
I Executed the above program and got the error which am facing for the first time Please help me to resolve this
****************************************************************************

C:\Other Stuff\MyFirst\Excerpt from Java.Lang.Thread.java:3: class Thread is public, should be declared in a file named Thread.java
public class Thread implements Runnable
^
C:\Other Stuff\MyFirst\TestMyThread.java:1: cannot access Thread
bad class file: C:\Other Stuff\MyFirst\Excerpt from Java.Lang.Thread.java
file does not contain class Thread
Please remove or make sure it appears in the correct subdirectory of the classpath.
class TestMyThread extends Thread {
^

Tool completed with exit code 1

****************************************************************************
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Duplicate of https://coderanch.com/t/266803/java-programmer-SCJP/certification/please-help-me-resolve
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic