For some inexplicable reason my NetBeans install 7.4 beta stopped showing the StringBuilder methods in my Java classes.
I haven't messed with anything at all it just stopped working.
Any suggestions?
Download the documentation from Oracle site if you want the documentation
for offline reference.
Go to the menu Tools -> Java Platforms. There you can select the
Java version you are using and then click on Add Zip/Folder on javadoc
tab and specify the path to the downloaded zip. Or click on Add URLand put `http://docs.oracle.com/javase/7/docs´.
NOTE: links are for Java 7 API.
Related
I have problem importing import "javafx.util.Pair" into my program.
after searching the net I've found this answer cannot resolve symbol javafx.application in IntelliJ Idea IDE and I've installed desired jar file but still I've problem to import.
this is what I face to when open java jdk.
I don't know the why the "jfxrt.jar" is different.
note the black arrow on the folder icon
open the File | Project Structure dialog, there under Platform Settings select SDKs and then your JDK 1.8. On the right you then see all the jars that make up the classpath to your SDK. Make sure that your jfxrt.jar is in that list, if not, you can add it by clicking the '+' button at the bottom.
Update May 2020
JavaFX is no longer part of the Oracle or OpenJDK default distributions. Instead it is available as a seperate library or module set.
For instructions on using JavaFX in your application, see the documentation at:
https://openjfx.io
For instructions on working with a modern JavaFX installation and Idea, also see the related question:
IntelliJ can't recognize JavaFX 11 with OpenJDK 11
You don't need to "install the desired jar" (whatever that means).
You don't need to do that for JavaFX. You should not do anything explicitly with jfxrt.jar either in the filesystem or by adding it to a project classpath. If doing something on the filesystem, that is especially bad as jfxrt.jar is not made to be standalone and requires related native libraries shipped with the JDK in order to work.
The JavaFX code should be part of the JDK installation you are using. Perhaps you are using a Java version below 8 or an OpenJDK implementation that does not include JavaFX. If so, then install the Oracle JDK 8+ and set idea to use it. Everything should just work then and all of related JavaFX imports will resolve.
I'm trying to run a program that uses the JavaFX scene object TextInputDialog. For some reason, it doesn't allow me to import javafx.scene.control.TextInputDialog (says "cannot be resolved").
I'm new to JavaFX, but here is what I tried. I thought it was my Java version, so I updated to the latest (1.8.0_91). I'm using Eclipse Neon 4.6.0. To install JavaFX it used the "install new software" option in the help menu, and put in the link found in step 4 of this: https://www.eclipse.org/efxclipse/install.html. After that, most of the JavaFX functions worked by adding the requisite import command. But this one doesn't.
I also found that some people have included the JavaFX library in the build path. I didn't change anything when I did that (though I'm not sure exactly what that would do since I already installed JavaFX in Eclipse).
Anyway, any suggestions would be very welcome. Thanks!
You need to make sure that eclipse is using the newer JRE for this project. You can do this by going to Project > Properties > Java Build Path and selecting the newer JRE from the list. I believe it needs to be 1.8.0_45 or newer.
I installed JavaFX 2.2 (bundled iwith Java 7 U7) on Windows and I am using Eclipse. I would like to add the javadoc to Eclipse, but I can't find it in the JDK folder.
So, where is the javadoc for JavaFX 2.2? (for offline usage)
Thanks for any hint!
Check this page:
http://www.oracle.com/technetwork/java/javase/documentation/java-se-7-doc-download-435117.html
After clicking Accept License Agreement you can download *javafx-2_2_0-apidocs.zip*
I remember stumbling over the same problem.
What I ended up doing is installing JavaFX for Java 6 which still includes the Javadoc. Then, I copied the Javadoc folder over to some place and uninstalled the whole thing again. On Windows, the folder should be located somewhere like C:\Program Files\Oracle\JavaFX 2.2 SDK\docs\api.
It's not a very nice solution, but it works.
I recently started using Ubuntu and installed netbeans 6.9.1. I seem to be missing some javadocs tho that get installed with the windows version.
Basically the netbeans docs are there but when the code completion comes up it only tells me the function prototype. Where theres usually a description it says that the javadocs are not found and they should be added in the platform or library manager.
Basically I just want the docs explaining the methods for basic java, swing, and awt. Anyone know what files it is i want to be getting, and can I do it all with apt-get?
OS:
Ubuntu 10
Probably you have not installed java-doc package:
sudo apt-get install sun-java6-doc
or what ever is suitable for you.
I had the same problem. Solution is very simple:
You have to download "Java SE 6 Documentation" from this page (in Additional Resources list)
http://www.oracle.com/technetwork/java/javase/downloads/index.html
It is a zip file (~50 mb). Put this file to some place you like(I suggest you to put it to the JDK directory, but you can put it to your home directory) and then open NetBeans.
Select Tools -> Java Platforms. Then select JDK on the left window. In the Javadoc tab, click Add ZIP/Folder and choose file you recently download.
When you done this, your javadoc in code completition windows will work correctly.
I'd like to know how to setup IntelliJ to point to the JDK documentation so the documentation popups that display during code completion will show me what the function I'm looking at is going to do. For some reason IntelliJ isn't able to find the JavaDocs by default.
I'm also not 100% sure that the documentation is installed with the JDK that's installed with the OS. I don't see them in /System/Library/Frameworks/JavaVM.framework/ but I may be looking in the wrong place. If it's not included, I'd also like to know what needs to be downloaded and where it needs to be installed to get the JavaDocs for the JDK to show up in IntelliJ.
I had to combine the responses I got to this point and add a few extra details so I'm answering my own question.
Search for "Java developer" from Downloads for Apple Developers
Download and install "Java for Mac OS X 10.6 Update 9 Developer Package" (or later).
In IntelliJ, open File -> Project Structure.
Click on "SDKs" under "Platform Settings".
Add the following paths under the "Documentation Paths" tab (the paths may be different based on which JDK you're using):
/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/docs.jar!/docs/api
/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/appledocs.jar!/appledoc/api
Add the following path under the Sourcepath tab:
/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/src.jar!/src
Thanks, #Yishai for the download location and #Gareth Davis for the location of the documentation after installing.
Update for 10.7/10.8 [Mountain] Lion:
Steps are the same except for these changes:
In step 2, download "Java for OS X 2012-005 Developer Package" (or later).
Use these paths instead in step 5.
/Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/docs.jar!/docs/api
/Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/appledocs.jar!/appledoc/api
Use these paths instead in step 7.
/Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/src.jar!/src
Quick (and dirty?) solution: Point IntelliJ to http://download.oracle.com/javase/6/docs/api/
have you installed the Apple Java Developer package?
It provides src.jar and docs.jar in /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home
Note this is since update 3. If these are present Intellij will just find them, or at least mine did.
details are in the Java update release notes
This should tell you what you need to know: Get local copies of Mac OS X Java source code and Javadoc – Concord Consortium wiki.
That page recommends going to https://connect.apple.com and downloading and installing “Java for Mac OS X 10.5 Update 2 Developer Documentation (Disk Image)” or the equivalent newer release. It describes a few ways to view the documentation, based on the Java jar file being located at a path like this:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/src.jar