This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes exception in thread main error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "exception in thread main error" Watch "exception in thread main error" New topic
Author

exception in thread main error

vinodh kumar
Greenhorn

Joined: Oct 18, 2005
Posts: 1
my java jdk has some problems.It compiles files correctly and while running it shows as :

D:\Java\programs>javac HelloWorld.java

D:\Java\programs>java HelloWorld
Exception in thread "main" java.lang.NoSuchMethodError: main

I have given the path and classpath correctly but still i face the problem even after new installation of jdk.My present version is older than the previous version.Please reply soon as my works are pending .
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Originally posted by vinodh kumar:
my java jdk has some problems.It compiles files correctly and while running it shows as :

D:\Java\programs>java HelloWorld
Exception in thread "main" java.lang.NoSuchMethodError: main

I have given the path and classpath correctly.


Does your HelloWorld have a main method that looks like
public static void main( String[] args )
??
[ October 18, 2005: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception in thread main error
 
Similar Threads
doubt in passing a two dimensional array from one class to another
Problem with interpreter
I recently started receiving this error message
Exception in thread "main" java.lang.NoClassDefFoundError: Test
java.lang.noclassdeffounferror