Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problems with a build error in Netbeans 6.5.1

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
Posts: 5856
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Blueberry pie is best when it is firm and you can hold in your hand. Smell it. And smell this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic