ILikeTurtles
ILikeTurtles

Reputation: 1022

Attempting to install library into netbeans (Xstream)

I am currently using the NetBeans IDE 7.3 for my Java development.

I downloaded a file called XStream.

http://x-stream.github.io/

I attempted to add the library to my project by right clicking on libraries and choosing Add Library. I then selected the top level folder for the downloaded Xstream; I was unable to import any of the Xstream files into my project. I am sure I am missing a simple step but Googling "Installing XStream in netbeans" does not reveal any how-tos.

I also right clicked Libraries and chose Add Jar/Folder and I still cannot import XStream.

Can someone please point me in the direction of a simple explanation for installing XStream in Netbeans so I can use it in a java project?

Upvotes: 1

Views: 1658

Answers (2)

Masked Coder
Masked Coder

Reputation: 280

I tried the same thing as you, @Aaron and got the same result. However, when I drilled down and selected the xstream-1.4.8.jar instead of just the top level folder, I had success. I realize this is a couple years late, I'm just hoping this'll be useful for future readers.

Upvotes: 1

ILikeTurtles
ILikeTurtles

Reputation: 1022

In order to easily add libraries in Netbeans you must -

  1. Locate your project in the project viewer window. Then click to drop down the project information.
  2. Locate the "Libraries Folder"
  3. Right click on the "Libraries Folder"
  4. You may add a library there or a jar using that list

After you add the library you may want to make sure that the jar is in an easy to find location. I normally create a folder in my project and store the JAR file or libraries there in order to simplify locating them.

Upvotes: 0

Related Questions