This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Problems with a build error in Netbeans 6.5.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Problems with a build error in Netbeans 6.5.1" Watch "Problems with a build error in Netbeans 6.5.1" New topic

Problems with a build error in Netbeans 6.5.1

Will Bithell

Joined: Apr 24, 2009
Posts: 1
Hi All, I'm a complete noob, who's just trying to get a downloaded project running in Netbeans 6.5.1, all class librarys are in the project, all with source, and there are no errors shown in the project window. When I run the main class, I get the following error, can somebody decipher this and offer some advice please?

java.lang.NoClassDefFoundError: java/library/path
Caused by: java.lang.ClassNotFoundException: java.library.path
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
Could not find the main class: java.library.path. Program will exit.

I think it's something to do with the JRE or SDK, but I don't know what Any help greatly appreciated..
Peter Johnson

Joined: May 14, 2008
Posts: 5852

Will, welcome to Java Ranch!

What is the full name (including the package) of the class with the main() method? Exactly how are you going about running the class? Looks like NetBeans thinks that you class is named "path" and has a package name of "java.library". Both of these are suspect to me (class names usually start with caps, and only the JVM classes should have "java" as the root package name.

JBoss In Action
jQuery in Action, 3rd edition
subject: Problems with a build error in Netbeans 6.5.1
It's not a secret anymore!