My program is just a simple System.out.println(""); But netbeans cannot find the main method. Is netbeans 6.7.1 conflict with WIN7? Any possible error?
A:
Make sure it is
public static void main(String[] argv)
No other signature will do.
Thilo
2009-12-23 08:36:26
Sure it is..I have run it once.. It is Ok but when I try again, the error occured...
2009-12-23 08:39:43
What error, can you paste the error into your post ?
PeterMmm
2009-12-23 09:05:15
A:
Check for correct method declaration
public static void main(String [ ] args)
Check netbeans project properties in Run > main Class
PeterMmm
2009-12-23 08:38:12
A:
in Project window right click on your project and select properties go to Run and set Main Class ( you can brows it) . this manual work if you have static main in some class :
public class Someclass
{
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
//your code
}
}
Netbeans doesn't have any conflict with W7 and you can use version 6.8 .
SjB
2009-12-23 08:43:37