This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Class Path error Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic
Author

Class Path error Help

Sid Robin
Ranch Hand

Joined: Nov 24, 2007
Posts: 53
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
Marshal

Joined: Mar 22, 2005
Posts: 41017
    
  43
Duplicate of http://www.coderanch.com/t/266803/java-programmer-SCJP/certification/please-help-me-resolve


Ping & DNS - my free Android networking tools app
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Class Path error Help
 
Similar Threads
stack overflow error
please help me to resolve this
Problem with sourceforge project
throw in finally clause
CLASSPATH PROBLEM