Netbeans - Error: Could Not Find or Load Main Class

Netbeans/java: Could not find or load main class library

And the solution lays in a VM Options. I already added the VM Option -Djava library path="/usr/lib/jni/" to make librxtx-java work (according to this post). Removing this VM Options fixed my problem. I haven't tested if I still can connect to my serial device (the reason why I'm using librxtx-java) because I don't have my serial device over here.

could not load main class netbeans

Actuall, when you click the "Run" button on top of the netbeans window, it only run the application's main class . but this Sequence class is not the main class of the project most probably. for this case to run this class you have to right click on Sequence class editor and select Run or Run as menu. Then this class will be executed on separate console, I hope this will work ..

No Main class found in NetBeans

  1. Right click on your Project in the project explorer
  2. Click on properties
  3. Click on Run
  4. Make sure your Main Class is the one you want to be the entry point. (Make sure to use the fully qualified name i.e. mypackage.MyClass)
  5. Click OK.
  6. Run Project :)

If you just want to run the file, right click on the class from the package explorer, and click Run File, or (Alt + R, F), or (Shift + F6)



Related Topics



Leave a reply



Submit