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
- Right click on your Project in the project explorer
- Click on properties
- Click on Run
- 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)
- Click OK.
- 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
Why Can't You Reduce the Visibility of a Method in a Java Subclass
Understanding the etc/Gmt Time Zone
Error:Java.Lang.Nosuchmethoderror: Org.Objectweb.Asm.Classwriter.<Init>(I)V
The Value for the Usebean Class Attribute ... Is Invalid
How Can a Keylistener Detect Key Combinations (E.G., Alt + 1 + 1)
How to Add New Methods to the String Class in Java
Zoom Box for Area Around Mouse Location on Screen
Populate Jfreechart Timeseriescollection from MySQL Db
Java Method Dispatch with Null Argument
Getting Class Cast Exception Where Both Classes Are Exactly the Same
Httpclient 4, Error 302. How to Redirect
Process Thymeleaf Variable as HTML Code and Not Text
How to Unzip Files Recursively in Java
Rethrowing an Exception: Why Does the Method Compile Without a Throws Clause
Javac Error: Class Names Are Only Accepted If Annotation Processing Is Explicitly Requested