tags:

views:

1142

answers:

3

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
Sure it is..I have run it once.. It is Ok but when I try again, the error occured...
What error, can you paste the error into your post ?
PeterMmm
A: 
  1. Check for correct method declaration

    public static void main(String [ ] args)

  2. Check netbeans project properties in Run > main Class

PeterMmm
I have checked all that I can check..I wont make such a simple mistake..I doubt that Netbeans is conflict with Win7...
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
pls see above comments