Bookmark Topic Watch Topic
  • New Topic

Class Path error Help

 
Sid Robin
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • 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

****************************************************************************
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
 
    Bookmark Topic Watch Topic
  • New Topic