Having Trouble Using a Project as a Library
I have a NetBeans project MyUtility which contains, as you may surmise, methods that I've created to quicken up my coding. I have imported this project as a library into another NetBeans project I am creating using
File > Project Properties > Libraries > Compile > Add Project...
and then selecting the project I want to use as a library (MyUtility). When I'm in the IDE coding my other project, everything works fine. Suggestions are made correctly, and the IDE picks up JavaDoc code I have typed. However, when I try to run a test class in my other project, this happens:
Exception in thread "main" java.lang.NoClassDefFoundError: math/Math
Caused by: java.lang.ClassNotFoundException: math.Math
at java.security.AccessController.doPrivileged(Native Method)
... 4 more
Java Result: 1
The class Math in the package math is causing the error when I refer to it (that class is in MyUtility). I think I understand why; NetBeans is referencing the sources I have asked it to, but it is not compiling them in the jar file. I tried to fix this by using a dedicated libraries folder, but to no avail.
Can anyone give me a pointer, please?