0

I setup the Netbeanss 7.1.1 and write the simple code below. But when I run the class, it doesnt work correctly and give this message :

Error: Could not find or load main class paket.sss Java Result: 1

package paket;

public class sss {

    public static void main(String[] args) {

        System.out.println("....");
    }
}

I searched everywhere but I cant find. What is the solution?

Noel M
  • 15,812
  • 8
  • 39
  • 47
ceismail
  • 31
  • 2
  • 5
  • 2
    In what file is that class saved? (ps: do not use HTML tags for code formatting - you only need to indent by 4 spaces to get automatic formatting) – assylias Mar 08 '12 at 11:25

2 Answers2

0

I had the same problem and I didn't find any of the answers good, but I had some čćšž characters in my directory so I made projects right on E:\ and it worked just fine.

Shantha Kumara
  • 3,272
  • 4
  • 40
  • 52
Matej
  • 1
0

This error will occur if the class file does not exist.

I suggest you do a rebuild and make sure this class exists in the target directory.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130