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?
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.
In order to easily add libraries in Netbeans you must -
Locate your project in the project viewer window. Then click to drop down the project information.
Locate the "Libraries Folder"
Right click on the "Libraries Folder"
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.
Related
Following a tutorial to set up selenium in the eclipse IDE but stuck on this step. Adding a build path to my project and then adding the external jar files for selenium, but I don't know where to add it, right now I am in the ModulePath directory where JRE System Library is located, but the instructor does not see this and the only thing there for them is JRE System Library.
Am I able to just add the files here, which I have already done, or should remove them? I cannot add them directly to the JRE System Library as shown in the picture because if I click it turns the add external jars off.
Sorry if the question is not clear I am new to programming and Stack Overflow.
I have installed NetBeans IDE 8.0.2.
When I am importing .zip file of my old project on which I was working, it's showing
"JAVADB_DRIVER_LABEL" could not be found (in projectNAME)
When I was adding that driver library it was not there in NetBeans' Library list. So what should I do to run my project ?
This is an old question, but for anyone searching in the future, here is my experience. When I shared a project with a customer which used Derby database, they needed to load the Java DB Driver, which in my case includes the derby.jar, derbyclient.jar, and derbynet.jar files. Until those where added, they got the JAVADB_DRIVER_LABEL error. In Netbeans, to do this you can either locate the *.jar files I referenced and add them in your Libraries folder in the project as jars, or use the "add library" option (right click on Libraries, Add Library) and select the "Java DB Driver" library which will add the necessary files.
I got that. We just Have to make New class Library and give it name "JAVADB_DRIVER_LABEL" and simply press OK button !
I have solved the problem:
You need to right click library and click add library
Create library
Put name whatever you want
Add jar for class path
Choose -derby.jar -derbyclient.jar -derbynet.jar
OK
Go to the beginning and add the library which is created by you
I downloaded jna.jar and I added it to my project, and I'm getting errors such as com.sun.jna does not exist, and I think the reason why my project doesn't work is because I can't import com.sun.jna.Native and the others.
Can someone please tell me how can I fix this?
Thanks in advance!
Had a similar problem myself and found that I needed to add the jar files to the Compile-time libraries. This automatically adds it to the run-time libraries. It's likely you only added the libraries as run time libraries, but not compile-time.
To do this you can do Project->Project Properties then select Libraries. On the Compile tab, click Add JAR/Folder for each library (jna-4.1.0.jar and jna-platform-4.1.0.jar, for example.)
After clicking OK, your compile errors should go away.
If you plan to use JNA in several projects, create a new library in Tools Libraries. Click on New Library... Type in JNA in the Library Name. In the Classpath tab, add the two .jar files by clicking on Add JAR/Folder... Click OK. To add the files to each project, then simply Project->Project Properties and Select Libraries. In the Compile tab simply click on Add Library... and select your new "JNA" library. Click OK. You'll see your JNA .jars as two stack of books icons under Libraries in the Projects view.
For almost every library I've come to see a link of the JAVADOCS jar to be downloaded, plain and simple. Why There is no jar for SWT ? and if there is why it's not on their website ..
Please note that I know there is a version in Eclipse help, and there is an online version, which I can't link to cause It doesn't validate cause it's in php ! no Index.html found
Though that's not what I'm looking for I tried it, I'm using SWT.jar and I want to attach the javadocs jar to it so when CTRL+Space and highlight a method I just see the docs right away beside etc you know..
Anyway Because I think SWT is so great I feel like there is a simple way to do that and I just can't see it maybe. if there is nothing I think I should file a feature request or somethin' to them.
Ok I kinda knew this question was not going to get much interest, so I gave it another try and I came back cause I don't want anyone to waste 1 hour of trying to figure out something like that..
Download the swt zip
Go to eclipse and load existing project
you'll find src.zip in that project
unzip src.zip and copy the folder "org" org\eclipse\swt..
paste that folder in src (inside the project)
select org folder in eclipse then go to project >> generate javadocs
If you're in windows you probably going to press on (Configure) to pick up the Javadoc.exe file it's in the C:\programFiles\java\jdk-xyz\bin\
choose where you want to drop the doc files, next then finish
ok, just go to the files and zip it, P.S zip the files don't zip the folder which contains the files cause when you load the docs as archive and validate it won't see the index.html
if you want to know how to load the archive, google it's in (in project properties>> java buildpath >> libraries tab >> swt jar >> add jar >> add your SWT.jar then expand and edit the javadoc location..
That was Robo detailed I know, I just don't want someone to read this and still can't do it
The suggested way to develop SWT apps is by following the instructions at Developing SWT applications using Eclipse. Each download page of eclipse includes an SWT section with SWT source complete zips.
The second way as mentioned is to look in your eclipse/plugins directory and use the 2 arch compatible jars provided there:
org.eclipse.swt.gtk.linux.x86_64_3.7.0.v3735b.jar
org.eclipse.swt.gtk.linux.x86_64.source_3.7.0.v3735b.jar
The source jar can be attached so as to provide javadoc. The javadoc (for most of the API shipped with eclipse) is stored in the eclipse/plugins/org.eclipse.platform.doc.isv_3.7.0.v20110602-0800.jar jar. If you unzip that, it should be in reference/api
I know that Eclipse is setting up a maven repository, although a quick scan for org.eclipse.swt only found 3.6.2 binaries and source. See http://maven.eclipse.org. They're still in they trail phase.
I downloaded the WiiRemoteJ java library from here:
http://dl.qj.net/wii/homebrew/wiiremotej-v14.html
But I don't know how to install it into netbeans to use with a project!
I went to tools>Libraries, then clicked New Library... then typed "wiiremotej" as the name. Under class path, I navigated to the "WiiRemoteJ.jar" file. Then I added the JavaDocs folder.
When I created a new project and tried to import the library, (import WiiRemoteJ.*;) it gives me an error and says "Package WiiRemoteJ does not exist"!
The same thing happened with another wii remote library I tried (motej)
Does anyone know what i am doing wrong?
Well, the most straight forward approach would be to right click the project's Libraries node, and select Add JAR/Folder. This way you can use the JAR right away, without any additional registration.