How do I add the Java API documentation to Eclipse? - java

I have downloaded Java API documentation from http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs and have supposedly attached it to Eclipse using the
Window->Preferences->Java->Installed
JREs->Edit->"Select rt.jar"->Javadoc
Location
And the location has been accepted and "Validates" just fine. However, for the life of me, I can't get Eclipse to show the Javadocs in the tooltip whene I hover over an item (for example in the declaration of an ArrayList). I have also restarted Eclipse in attempts to get it to work
What am I doing wrong?

To use offline Java API Documentation in Eclipse, you need to download it first. The link for Java docs are (last updated on 2013-10-21):
Java 6
Page: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-doc-download-355137.html
Direct: http://download.oracle.com/otn-pub/java/jdk/6u30-b12/jdk-6u30-apidocs.zip
Java 7
Page: http://www.oracle.com/technetwork/java/javase/documentation/java-se-7-doc-download-435117.html
Java 8
Page: http://www.oracle.com/technetwork/java/javase/documentation/jdk8-doc-downloads-2133158.html
Java 9
Page:http://www.oracle.com/technetwork/java/javase/documentation/jdk9-doc-downloads-3850606.html
Extract the zip file in your local directory.
From eclipse Window --> Preferences --> Java --> "Installed JREs" select available JRE (jre6: C:\Program Files (x86)\Java\jre6 for instance) and click Edit.
Select all the "JRE System libraries" using Control+A.
Click "Javadoc Location"
Change "Javadoc location path:" from "http://download.oracle.com/javase/6/docs/api/" to "file:/E:/Java/docs/api/".
It must work as it works for me. I don't need Internet connection to view Java API Documentation in Eclipse anymore.

For offline Javadoc from zip file rather than extracting it.
Why this approach?
This is already answered which uses extracted zip data but it consumes more memory than simple zip file.
Comparison of zip file and extracted data.
jdk-6u25-fcs-bin-b04-apidocs.zip ---> ~57 MB
after extracting this zip file ---> ~264 MB !
So this approach saves my approx. 200 MB.
How to use apidocs.zip?
1.Open Windows -> Preferences
2.Select jre from Installed JREs then Click Edit...
3.Select all .jar files from JRE system libraries then Click Javadoc Location...
4.Browse for apidocs.zip file for Archive path and set Path within archive as shown above. That's it.
5.Put cursor on any class name or method name and hit Shift + F2

Eclipse doesn't pull the tooltips from the javadoc location. It only uses the javadoc location to prepend to the link if you say open in browser, you need to download and attach the source for the JDK in order to get the tooltips. For all the JARs under the JRE you should have the following for the javadoc location: http://java.sun.com/javase/6/docs/api/. For resources.jar, rt.jar, jsse.jar, jce.jar and charsets.jar you should attach the source available here.

Old question, but I had current problems with this issue. So I provide you my solution.
Now the sources and javadocs are inside the jdk. So, unzip your jdk version.You can see that contanins a "src.zip" file. Here are your needed sources and doc files.
Follow the path:
Window->Preferences->Java->Installed JREs-> select your jre/jrd and press "Edit"
Select all .jar files, and press Source Attachement.
Select the "External File..." button, and point it to src.zip file.
Maibe a restart to Eclipse is needed. (normally not)
Now you should see the docs, and also the sources for the classes from jdk.

I went through the same problem and I did not find some of the above answer useful because they are old and with new JDK 1.8 , documentation section has
been moved to src.zip in JDK folder (C:\Program Files\Java\jdk1.8.0_101 ) .
Now I tried everything from above and it was showing me the same problem if I press ctrl and click on (for example String or System) in my program I get the Source not found.
Now you can do this, go to the folder where JDK (C:\Program Files\Java\jdk1.8.0_101) is installed and try to unzip src.zip. Here you might face an issue as sometime due to administrative rights on this folder it would not allow you to unzip this src.zip. For solving the issue , copy src.zip and paste in any other folder ( example Desktop) and then create a folder src and unzip in it.
Now copy this folder back to JDK 1.8 folder**(C:\Program Files\Java\jdk1.8.0_101).**
Now just go to eclipse and open any program and press ctrl and click on any external objects or anything (for example String or System) .You will get Source not found , Now Click Attach source -> External Location -> External Folder and add your src location (C:\Program Files\Java\jdk1.8.0_101\src).
Now you are good to go , I tried and it worked for me.
All the above folder location are from my system , so It might be different for you.

Go to your JDK installation. (C:\Program Files\Java\jdk1.8.0_66 for me).
Unzip the src.zip file (becomes C:\Program Files\Java\jdk1.8.0_66\src\ for me).
In the Eclipse editor window: CTRL + Click on a java.lang library class. (something like String).
Eclipse will complain Source not found and tell you that you don't have the source.
Click Attach source -> External Location -> External Folder.
Find your source folder (C:\Program Files\Java\jdk1.8.0_66\src\ for me).
Click OK -> OK.
Enjoy.

Likely a problem with the path that you specified in Javadoc Location. It is pretty finicky. Make sure that it points at the root of where the javadoc starts. It could be a few directories down in the zip you've downloaded.

I have had a similar issue and looks like that the culprit was the space in the path to the archive (e.g., C:\Program Files\java\jdk). After moving the archive to another directory without spaces in path it started to work.

Instead of attaching JavaDoc attach JDK src.zip

Choose one class you want to view its documentation and press Ctrl+click over it, the Javadoc page will inform you that there is no Javadoc file attached and bellow will see a button named "Attach File". Press that button and browse to the directory where JDK is installed, normally for Win is C:\Program files\Java\jdk_xxx and inside this folder there is a src.zip file - sleect it and press OK and all is done - you already have Javadoc attached.

For OpenJDK 8 on Linux see: https://askubuntu.com/questions/755853/how-to-install-jdk-sources
The way that worked for me is:
The default src.zip is a symbolic link pointing to a non-existing folder ...
sudo apt-get install openjdk-8-source this adds this folder
locate "src.zip"
Eclipse: Window --> Preferences --> Java --> "Installed JREs", edit and point to src.zip (or open any JRE class like for example HashMap and attach source)
You should now see the JavaDoc when opening JRE classes via Ctrl+Shift+t, previously this was not possible, Eclipse may have got a docs from the default URL on mouse over methods but this requires a stable internet connection.

Ensure "Preferences" -> "Java" -> "Editor" -> "Hovers" -> "Combined Hover" is checked.

I just had to dig through this issue myself and succeeded. Contrary to what others have offered as solutions, the path to my happy ending was directly correlated to JavaDoc. No "src.zip" files necessary. My trials and tribulations in the process involved finding the CORRECT JavaDoc to point at. Pointing a Java 1.7 project at Java 8 Javadoc does NOT work. (Even if "jre8" appears to be the only installed JRE available.) Thus, I beat my head against the brick wall unnecessarily.
Window > Preferences > Java > Installed JREs
If the JRE of your project is not listed (as happened to me when I migrated a jre7 project to a new jre8 workspace), you will need to add it here. Click "Add..." and point your Workspace at the desired jre folder. (Mine was C://Program Files/Java/jre7). Then "Edit..." the now-available JRE, select the rt.jar, and click "Javadoc Location..." and aim it at the correct javadoc location. For my use:
For jre7 -- http://docs.oracle.com/javase/7/docs/api/
For jre8 -- http://docs.oracle.com/javase/8/docs/api/
Voila, hover tooltip javadoc is re-enabled. I hope this helps anyone else trying to figure this problem out.

if you are using maven:
mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true

Related

How to debug a class file in eclipse oxygen

Since a long time i have been searching how to debug a class file in Java.
For example :- consider a below code snipet.
Map map = new HashMap();
map.put("1","A");
map.put("2","B");
Now when if i want to understand internal working of put then it should redirect me to put method in HashMap class.
I have installed decompiler in my eclipse.
I set the breakpoint over put() but compiler does not comes till this point.
It skips the internal working of the method and points directly to next line defined by me.
Please help if there is anyway to debug class file
To debug the execution of core/JDK classes with breakpoints you need to add the source code of these classes.
For recent versions of Java, after unpackaging/installing the JDK,
you will find an archive at the root of the JDK folder such as src.zip for a Windows JDK.
Once you identified this file, make it accessible in any Eclipse projects by configuring the sources in the installed JRE section of the Eclipse preferences :
select the JRE (JDK generally) that you are using
click on "Edit"
select all JRE system libraries and click on "Source Attachement"
click on "External File" to select the zip file containing the sources you previously downloaded.
valid it by clicking "OK"
Here is a screenshot capturing relevant information :
In addition to the setup posted by davidxxx When in debug mode and the execution hits your debug point remember to use "step into" rather than "step over". "step into" will then get you into the .put() method.
You don't need a decompiler for this, not for classes in the JDK. Trying to use one might even cause you problems. Usually all you have to do is make sure your Installed JREs preference page contains a JDK and that you launch your Java Application using it, and not a JRE. The location of a JDK's sources are well known, so should be found automatically, and a JDK's .class files contain the debugging information to expose field names and local variables to the debugger while stepping.

Eclipse - Source not found

I know this question has been asked many times before, but none of the proposed solutions resolve my issue (or I'm not implementing them correctly).
I'm developing a plugin for OpenFire, and when I set a breakpoint in my plugin source Eclipse reports "Source not found". The JAR is built separate from the build of the OpenFire server. I've tried adding the JAR and specifying the source code directory, but no dice.
Here's the process I'm following: When I hit my breakpoint I'm clicking "Edit Source Lookup Path", clicking "Add", Java Library, User Library, click User Libraries, adding my library (tried both "Add JARs" and "Add External JARs"), and then specifying the folder that contains the source code. I've also tried:
Adding the source by selecting "File System Directory" instead of "Java Library"
Adding it by selecting "Workspace Folder"
In the Project Explorer, adding the source for my plugin to the Java Build Path
In the Project Explorer, adding my JAR as a Library and specifying the Source attachment
Thanks in advance for any suggestions.
Personally, I have no good experience in Eclipse JDT, when adding a source folder at the time it hits a break point. What I always prefer to do, is adding the source folder before debugging:
Select Project/Properties/Libraries
Select your library and "edit..." the source attachment
Select either the corresponding source folder or the zip/jar containing the package
After that, you should be able to open the source files in the virtual "Referenced Libraries" folder (directly below the "JRE System Library" folder inside the project), or when opening a reference to a linked class file from within the JDT editor. If you are able to access the source, then you should also be able to at least stop at the break point and see the corresponding source.
Else, you will have to check again, if the source folder is really valid: The source folder or source archive must contain the folder with the name of the root package of the library (e.g. the default Java "src.zip" inside the JDK folder also includes a corresponding "java" folder at its root). When in doubt, extract the archive and select the parent folder of the package you are interested in - sometimes source archives might be a mess or incompatible to JDT.
If this has been assured and it still doesn't work, chances are, that your linked source folder does not correspond to the compiled version of the library. Usually JDT will handle such inconsistencies fine, but if you try to open a source file, that is entirely different than the corresponding class file, you will encounter problems. In this case I would suggest either downloading the correct source version of the library, or recompiling the library from the source, if all else fails.
If opening a referenced source file from withing the JDT editor does work fine, and you are still unable to open the source files when a break point is entered during debugging, then most likely the class files are missing the line numbers of the corresponding source file. Again, you will have to recompile the library from the source in this case.
Finally, it is also possible to overwrite the default source lookup by specifying source folders or archives in the source tab of the launch configuration. But you should normally not need to do this, when your build path is configured correctly. From the Eclipse Help:
The Source tab defines the location of source files used to display source when debugging a Java application. By default, these settings are derived from the associated project's build path. You may override these settings here.
I had this very annoying problem for a long time but was finally able to solve it. In my case, a null pointer exception was being thrown somewhere in Java's Transformer.IsRuntimeCode(ProtectionDomain) function.
I didn't really need to know about this since the exception was being caught and handled, but eclipse would pause debugging every time this happened and tell me that the source wasn't available. As a result, I constantly had to keep pressing the button to continue code execution.
In order to prevent this from happening, I:
1. Clicked on the "Breakpoints" window at the bottom of the debugging
screen
2. Right clicked "NullPointerException"
3. Unchecked "Caught"
This prevented the debugger from pausing program flow during a caught NullPointerException.alt text
(source: SharpDetail.com)
And this another one as:
Eclipse doesn't crash. You're trying to step into a method, where eclipse doesn't know where to find the source (*.java) files and informs you about this. Here is how to tell eclipse where to look. Go to
Window->Preferences->Java->Installed JREs,select the JRE you are using and click Edit.
There, select all of the jar files in the list you see and and click Source Attachment....
In the window that shows up, select the fille src.zip, which is in your JDK folder (if you didn't uncheck it while installing the JDK). On the machine I'm on right now, that is
C:\Program Files\Java\jdk1.7.0_07\src.zip.
Save all your changes (possibly restart eclipse) and you won't see that error again.
Well it turns out the solution was anticlimactic. When Balder's recommendations did not work I tried debugging one of the stock OpenFire plugins and it worked just fine. I then created a new plugin from scratch, and by doing nothing other than adding the source to the project (Right-click on the project -> New -> Source Folder) it also worked just fine. I have no idea why Eclipse refuses to see the source for my original plugin, but I moved all my code and libraries over to the new plugin and debugging is working as expected.
Many times you put jar files in eclipse IDE as referenced libraries when binary version of application was downloaded. Usually done so by configuring the build path. But the binary does not have the source files. You have Binary version and source version of application.
One simple way is to download the source libraries that you also use maven to build the project.
Keep somehwere, may be inside your project workspace.
Now while seeing the class file (from eclipse, jar exploded) you may see the source not found, fine.... there is a button below and click on that, a new window opens and there select add external folder.
Reference it to the src folder of the source you downloaded(not the binary one) and kept somewhere as said above and it will show the class details from that.
I fixed this issue with doing the following:
Click at the menu Window - Preferences - Debug - Step Filtering And check all the packages like the following image.
(Step Filtering)
Then, debug again your project and thats it.
Best regards,
In my case, I had a breakpoint in the class declaration. I mean in the next line.
public class GenerateInterface implements JavaCall {
So, the debugger stopped in that line and showed the following message:
Source not found
I think unconsciously activate the breakpoint in that line.

Eclipse edit java files and run under original folder

Although this seems an easy thing I'm not able to find the answer for it.
What I'd like to achieve is simple. I have a folder with java source files and I want to edit them using eclipse within a new project. But at the time of running the application I don't want eclipse to use the workspace project folder as "root", instead it should use the folder with the java source files.
The effect should be like opening the source files with a text editor directly and changing them, but instead this should be done through an eclipse project but still use the original folder to run the application.
I just want to have all the advantages that come from editing source files within an eclipse project instead of using something like notepad++.
I tried linking the source files and changing the relative path to the source directory but it doesn't work. When running the application it needs xml files which exist in the directory but because it's running "from" the eclipse project folder it doesn't find them.
I'm not sure I really understand what you want to do, but sounds like you want to set the run configuration's working directory: Open 'Run Configurations', choose the class containing your main method (or create a new run configuration for that class first if it's not yet there), then specify the Working Directory on tab 'Arguments'.
I do same with all my projects. What you need to do is :
Create workspace directory on different location than your source code.
Import your source code in your workspace directory. Here don't copy source to your workspace
EDIT
In Eclipse
Go to File->Switch Workspace->Other-> Type "new directory workspace" path, click OK. Eclipse will restart.
Go to File->Import->General-> Existing Projects into Workspace-> Next-> Select Root directory
Eclipse will list your project, select it.
Start editing and saving files.
Thought this does not directly answer your question, as an alternative to using Eclipse IDE for Java files try using Padclipse which is a text editor based on Eclipse.
Padclipse is a light weight text editor based on Eclipse. The basic
product is composed of Eclipse RCP plus Text Editor, Compare and
Search facilities and their dependencies. A few additional third party
plug-ins are included as well.
Check it out here
Also, the default JDK on my system was a 64 bit because of which starting up padclipse failed. Create a padclipse.ini in the folder where you unzipped it in and put in the following contents :
-showsplash
-launcher
padclipse.exe
-name
Padclipse
--launcher.library
plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070523\eclipse_1017a.dll
-startup
plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-vm
C:\dev\jdk\1.5\1.5.0_21\jre\bin\server\jvm.dll
Change -vm argument to point to the java.exe or jvm.dll of a 32 bit jdk.

Viewing Java documentation with Eclipse on Mac OS X

I'm trying to accomplish a very basic task and somehow can't seem to find how... I would like to have my Eclipse environment set in a way that I can get help and documentation on any standard class/method in the JDK, like I used to do a few years ago with Eclipse on Windows, where having the cursor on a class name (e.g. PrintWriter), and clicking Ctrl+F2 would open up the Java documentation for the PrintWriter class.
Here's my environment:
Running OS X version 10.6.6.
Just downloaded and installed the Java Developer Package for Mac OS X 10.6 Update 4 from connect.apple.com
I have Eclipse Galileo installed.
Under /Library/Java/JavaVirtualMachines I have a file named 1.6.0_24-b07-334.jdk, which seems to be the new JDK I just installed. However, it's a single file, not expanded into directories and files. Right-clicking it and selecting "Show Package Content" shows me that deep inside it contains the files docs.jar and src.jar. However, not sure what I should be doing with the 1.6.0_24-b07-334.jdk file - should I leave it as is, or perhaps expand it to a full directory structure?
Under Eclipse Preferences, Java/Installed JREs I have JVM 1.6.0 (MacOS X Default) selected. However, the path points to /System/Library... and not to /Library...
Anyway, in Eclipse, putting the mouse over a class name, I get a brown dialog with a short explanation of the class. However, I don't know how to open up the full java documentation of the class. Also couldn't find anywhere in Eclipse a place to indicate where to take the java documentation from, nor which hotkey would bring the java documentation up.
I apologize for the many details, I'm just assuming they may be necessary to get a good answer.
Thanks!
/A
I've had the same problem — previously I had been able access Java documentation and source directly in Eclipse, but that disappeared after one of the Java updates from Apple last year.
My solution was to manually add the source and Javadoc to the JRE definition in Eclipse. Here's how:
Navigate to Preferences --> Java --> Installed JREs
Select your preferred JRE and click Edit...
Select the classes.jar library (should be the first one in the list) and click Javadoc Location...
Click Javadoc in archive
Set Archive path to /Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Home/docs.jar
Set Path within archive to docs/api
Click OK
now, optionally, you can set the source code too...
With classes.jar still selected, click Source Attachment...
Set Location path to /Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Home/src.jar
Click OK
In fact that 1.6.0_24-b07-334.jdk package is actually just a folder; it is treated as a single file by OS X but you can access its contents directly if you know the right path. What if you don't know what path the enter? You can browse the contents from Eclipse if you know this trick:
While attaching source code or Javadoc in Eclipse, click on the External File... or External Folder... button etc to bring up a Finder window
Navigate to your Java JDK folder (usually /Library/Java/JavaVirtualMachines)
You should see a list of your JDKs, for example 1.6.0_22-b04-307.jdk and 1.6.0_24-b07-334.jdk)
Press / on your keyboard to bring up the Go to the folder dialog box
Delete the / from the dialog box, and start typing the name of JDK you want to navigate. You can press Tab to autocomplete the name if you like.
Click Go
You are now browsing the contents of the JDK package; you can now click through to Contents/Home etc where you should see appledocs.jar, docs.jar, src.jar and other goodies.
For everyone finding this StackOverflow-Post and not finding the src.jar:
Apple removed it from the SDK and it's not supplied by default, however you can download it from Apple self at:
http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.9.3.3.1
http://danbim.blogspot.com/2011/01/java-for-mac-os-x-106-update-3-and.html
P.S. Apple account is required (free registration)
To bring up the Java documentation in Mac, move your mouse to the desired class, then click SHIFT+FN+F2.
By the way, you can find out the shortcut key from Preferences -> General -> Keys -> type "Open Attached Javadoc". Here's my screenshot:-
Under /Library/Java/JavaVirtualMachines I have a file named 1.6.0_24-b07-334.jdk, which seems to be the new JDK I just installed. However, it's a single file, not expanded into directories and files. Right-clicking it and selecting "Show Package Content" shows me that deep inside it contains the files docs.jar and src.jar. However, not sure what I should be doing with the 1.6.0_24-b07-334.jdk file - should I leave it as is, or perhaps expand it to a full directory structure?
From what I remember from Mac OS (I had to use one two years ago for some months) I think this is not really a "single file", it only looks so in the file manager application. Look if you can navigate inside it in the file-chooser dialog of eclipse where you can select the docs.jar for your documentation.
I was having a similar problem, and was having trouble accessing the Apple Developer page to download a local copy of the docs.jar. I went to Preferences > Java > Installed JREs > Edit, and then looked at the "Javadoc Location..." value for the jars. The Javadoc URI was still set to "http://java.sun.com/javase/6/docs/api/". When I changed it to "http://docs.oracle.com/javase/6/docs/api/" the tooltips started showing up again. Of course, this will only work when you are online.

How to change the default project directory (folder) in Netbeans 6.9?

How to change the default project directory in Netbeans 6.9 for Java SE\ME\EE?
I don't think you can make it module-specific but you can set it as follows:
Close NetBeans
Find the projectui.properties file. For me (Windows) it was under C:\Documents and Settings\Catchwa\.netbeans\6.9\config\Preferences\org\netbeans\modules\projectui.properties
The projectsFolder=C:\\NetBeansProjects variable is I think what you want to change.
I found mine in a slightly different location (Windows 7 64-bit using Netbeans 7.2):
C:\Users\UserName\AppData\Roaming\NetBeans\7.2\config\Preferences\org\netbeans\modules\projectui.properties
Slightly different way of doing it for NetBeans 7.3 latest release (at least for Windows 7, 64-bit). Search your system for netbeans.conf (from explorer window) or go to its default install location:
C:\Program Files\NetBeans 7.3\etc\netbeans.conf
Look for netbeans.conf on Mac OS X:
find / -name "netbeans.conf" -print &
Look for netbeans.conf in Linux:
sudo find / -name "netbeans.conf" 2> /dev/null
Then edit the netbeans.conf file to replace the userdir line:
netbeans_default_userdir="${DEFAULT_USERDIR_ROOT}/7.3"
With your new projects directory/folder path:
netbeans_default_userdir="C:/APPS/netbeans/"
-OR-
netbeans_default_userdir="\Applicatons\netbeans\"
(NOTE: if you have trouble in Windows in a network managed security environment, you'll need admin access to make this change. Open the file using your editor's ".exe" directly by right-clicking the launcher file and clicking "Run as Administrator", I had to do this for Notepad++ because it said "Another application is using the file", but in fact it was just locked to non-admin users).
This changes the default userdir which stores user-specific IDE settings, but not the default project folder/directory. Next, you need to open NetBeans IDE with the new IDE settings and start to create a new Java project (then cancel after second screen in project creation wizard). It will now create a new projectui.properties file in the userdir you set; this is the file that wasn't found before this workaround that you need to edit as per the other suggestions. Mine was located here after these changes:
C:\APPS\netbeans\config\Preferences\org\netbeans\modules
Finally, you've reached the finish line and can change the projectsFolder property value to the path you want, if you don't see a line for projectsFolder then simply type or paste one in at the bottom of the file to point to your path where you want NetBeans to store projects by default, such as:
projectsFolder=C:/APPS/projects/
-OR-
projectsFolder=\Applicatons\projects\
Wow, that's alot of settings changes but it finally works for me the way I wanted it to, being able to switch my IDE back and forth between a local workspace and a network workspace using my username space on the corporate LAN just by changing projectsFolder property value in the projectui.properties folder.
NOTE:
On Linux or Mac you might not need the first step of modifying netbeans.conf as the projectui.properties should be as follows (may vary by OS version):
$HOME/.netbeans/7.3/config/Preferences/org/netbeans/modules/projectui.properties
Under Windows 7, logged in under AD, the projectui.properties file's directory was under the parent folder listed in the USERPROFILE environment variable (type set in a command prompt window):
C:\Users\my_login_name\\.netbeans\7.0\config\Preferences\org\netbeans\modules\projectui.properties
It was not in the directories pointed at by the HOME or APPDATA variables.
Changed projectsFolder value to new location, restarted NetBeans and default folder for new projects was in the new location. It worked!
In linux/Ubuntu
View hidden files in home directory (press ctrl+H on /home folder).
.netbeans\7.3\config\Preferences\org\netbeans\modules\projectui.properties
Update the following content in projectui.properties file
projectsFolder=/home/folder/NB
In newer versions, right-click on the project you want to move in the 'Projects' tab, and then click 'Move'. This will allow you to move the project to a new directory.
In windows 7 64 bit properties file can be found under c:\Users\user\AppData\Roaming\NetBeans\7.2.1\config\Preferences\org\netbeans\modules\ folder

Categories