Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I reference libraries in NetBeans?

I have a Java Web Services project that was created in an older version of NetBeans, and I haven't accessed it in many months, so my paths and installed libraries are different.

When I try to open the project, I get a "Resolve Reference Problems" dialog, and two Reference Problems are listed:

"metro" library could not be found
"JAX-WS-ENDORSED" library could not be found

I have a fresh installation of JDK 6 Update 25 with NetBeans 7.0, and am running Windows 7.

What steps can I take to solve this? I don't even know where to start, as every approach I've taken so far hasn't gotten me anywhere.

Note: JAX-WS-ENDORSED does not appear in my Libraries listing, so I can't remove it. Something hidden is referencing it. How would I find this?

like image 681
Jay Sullivan Avatar asked Jun 01 '11 20:06

Jay Sullivan


People also ask

How use external library in NetBeans?

Quick solution in NetBeans 6.8. In the Projects window right-click on the name of the project that lacks library -> Properties -> The Project Properties window opens. In Categories tree select "Libraries" node -> On the right side of the Project Properties window press button "Add JAR/Folder" -> Select jars you need.

How do I copy a library in NetBeans?

Go to source project, right click JAR, select edit. See the library classpath in the popup window. Close window, go to the destination, select add JAR. Can't cut and paste in path so have to hope you remembered it right.


1 Answers

I had a similar problem : DO NOT DELETE THE JAX-WS-ENDORSED - remind me to downvote. I had to go to the imported project > resolve reference problems dialogue > delete the references from there which were pointing to the old NB folders - pic : enter image description here

and then create the throwaway web service as suggested by William Scott and then add the newly created jars :enter image description here

like image 63
Mr_and_Mrs_D Avatar answered Sep 24 '22 05:09

Mr_and_Mrs_D