Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 443089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:08:09+00:00 2026-05-12T21:08:09+00:00

Quick personal background: I was hired a few months ago as the sole .NET

  • 0

Quick personal background: I was hired a few months ago as the sole .NET developer (C#) by a company whose other devs are all php devs. A week into the job I was told they wanted to switch to Java instead of doing .NET. Not an ideal situation, but I’m trying to make it work.

I don’t think I understand the relation between a project’s library and the class path. I am using NetBeans 6.7.1 for development. My current project is to create an application that will update multiple merchant sources (eBay, Amazon, etc). I created a Class Library project that handles scheduling of these updates. We’ll call it Update.

I am in the process of creating Class Library projects for the various sources (e.g. eBay). I added the ebay project to the Update project as a Library. In the IDE there is a box that says “Build Projects on Classpath” which is checked.

Finally, right now I have a little console app that has the Update project referenced as a Library (so the ebay project is now 2 libraries deep) in the same manner. It works with code in the Update project.

This works OK until I get to instantiating a class (from the Update project via the console app) that is in the ebay project. At that point I get a

Exception in thread "main"
java.lang.NoClassDefFoundError

which is

 Caused by: java.lang.ClassNotFoundException
  at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

These projects all build fine but this runtime exception is killing me. I don’t know if I really understand what adding a Library to a project does and if there is something more I need to do to make the class accessible. I’m used to being able to add a reference to a DLL and being good to go. I don’t understand why I don’t get any compiler errors or build errors but I get run time errors about accessibility. I’m guessing the classpath is a missing piece that I don’t understand too well, although I suppose it’s possible this problem has to do with something else entirely.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:08:09+00:00Added an answer on May 12, 2026 at 9:08 pm

    The solution I have come up with for now:

    I expected the references from nested libraries to “bubble up”. This apparently doesn’t work for classpaths. My structure was basically:

    A has reference to B has reference to C

    When I ran A it worked fine until it got to something in C. What I did was give A a direct reference to C by adding it as a library to the project. From some quick Google searches it looks like this pretty much IS how you add a classpath to a project in NetBeans.

    It seems a bit messy to me and maybe there is a better way to do that, but it has fixed my problems for now. Thanks to everyone who answered – while no one precisely solved my particular problem (you guys got me about 95% of the way there though) they verified my thoughts and enabled me to figure out that last little bit to get it going.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Got a quick question, I'm building a big website for a personal project and
Quick question. What do you think, I have a few sites that use a
Quick summary: I have a Rails app that is a personal checklist / to-do
Quick question: How can I access the BN_CLICKED constant and other constants defined for
Sometimes I create some quick personal projects using C# with Windows Forms or WPF
Quick question, I have the following string which is a coma separated list of
Quick question. If i am trying to clear multiple divs with the same class
Quick sanity check - I wanted to create a new remote branch for myself.
Quick question, indexof() find the first occur position of the string character? what about
Quick question, has anyone done a benchmark on random number generation between javascript and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.