I have made a project in NetBeans IDE using a custom library (a .JAR file added to the project within its properties dialog in NetBeans IDE), but when I try to build the project, it says this:
init:
deps-clean:
Updating property file: I:\Java\NetBeansProjects\MCItemCosts\build\built-clean.properties
Deleting directory I:\Java\NetBeansProjects\MCItemCosts\build
clean:
init:
deps-jar:
Created dir: I:\Java\NetBeansProjects\MCItemCosts\build
Updating property file: I:\Java\NetBeansProjects\MCItemCosts\build\built-jar.properties
Created dir: I:\Java\NetBeansProjects\MCItemCosts\build\classes
Created dir: I:\Java\NetBeansProjects\MCItemCosts\build\empty
Compiling 2 source files to I:\Java\NetBeansProjects\MCItemCosts\build\classes
I:\Java\NetBeansProjects\MCItemCosts\src\mcitemcosts\Main.java:7: package bht.tools.comps does not exist
import bht.tools.comps.BHMessagePanel;
I:\Java\NetBeansProjects\MCItemCosts\src\mcitemcosts\UIJFrame.java:13: package bht.resources does not exist
import bht.resources.Icons;
I:\Java\NetBeansProjects\MCItemCosts\src\mcitemcosts\UIJFrame.java:14: package bht.tools.comps does not exist
import bht.tools.comps.BHMessagePanel;
[and so on]
I:\Java\NetBeansProjects\MCItemCosts\nbproject\build-impl.xml:586: The following error occurred while executing this line:
I:\Java\NetBeansProjects\MCItemCosts\nbproject\build-impl.xml:269: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 3 seconds)
How do I get NetBenas IDE to recognize that it's supposed to put the .JAR library in the classpath upon building? It works within the IDE, by the way, so I know NetBeans works with the library and compiles normally just fine. I've tried using NetBeans IDE 6.9.1 and 7.0
How about setting it up as a library by choosing Tools on the menu and then Library option. Once it is setup, if you go to your project properties, and click the 'Libraries' option on the left you will be able to add it. Also, check the Build Required Projects checkbox on the bottom of Project properties -> Libraries. Btw, what external jar are you trying to add?