aspose file tools*
The moose likes Beginning Java and the fly likes [solved]when i run file,promt message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "[solved]when i run file,promt message "Class "lab4.que1" does not have a main method."why?" Watch "[solved]when i run file,promt message "Class "lab4.que1" does not have a main method."why?" New topic
Author

[solved]when i run file,promt message "Class "lab4.que1" does not have a main method."why?

L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51


above is my complete program file,what wrong to the code?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18103
    
  39

main method needs to be static for the class to be executed from the command line.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51
Henry Wong wrote:main method needs to be static for the class to be executed from the command line.

Henry

thank
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [solved]when i run file,promt message "Class "lab4.que1" does not have a main method."why?
 
Similar Threads
Number calculations
Why use protected???
Private Accessibility
So, which of these would be...