Monday January 30, 2006
- All
- NetBeans
JSE Directories
Directories in JSE and Netbeans: Install, User and Projects
The following are the three kinds of directories used by JSE and Netbeans:- Installation Directory.
The directory where ide is installed and run from. - User Directory.
The directory where user settings are stored. - Projects directory.
The directory where a jse/netbeans project is stored.
Each project has its own project directory.
Introduced since nb4 and jse8.
- Keep the directories separate.
For instance, it is possible to create the projects in user directory but not advisable.
Keeping the directories seperate allows you to get rid of any one of them without loosing other data. For instance, if for some reason, the ide install directory gets corrupted, then the ide can be reinstalled but the existing user settings and projects can be reused with the new install.
Similarly if the userdir gets corrupted, then the ide can be run with a fresh userdir without the need to reinstall the ide and existing projects can be opened in the ide. - Organize your projects under one master directory. Though the ide itself does not enforce this (and correctly so), you may want to create a top-level folder for all of your projects and arrange your projects within this folder. This may be especially useful when the projects have to be maintained in a source control system.
- Keep the sources separate from the project directory, by changing the source folders property in the project properties dialog. This way the project can always be deleted and recreated.
- If you reinstall the ide and run into issues while running it, the most probable reason is that the older user directory has some coflicting settings; try running the ide with a different userdir, as specified in the section below.
-
How to find the current user directory?
Run the ide and open the about box (Help | About) and switch to 'Details' tab. You will notice an entry for userdir. -
If you are unable to run the ide even:
Check the [ideinstalldir]/etc/*.conf file. There should be entry called "netbeans_default_userdir".
For jse versions prior to jse8, check the userdir property in [ideinstalldir]/bin/.runide_defaults_f4j_ee* file. -
Sometimes the user directory may get corrupted resulting in strange behaviour (like settings not getting saved etc). In such cases:
-
Run the ide with a fresh userdir as "[netbeans_install_dir]/bin/netbeans.exe -userdir [path_to_non_existent_dir]". As an example, [path_to_non_existent_dir] can be "c:\temp\myuserdir". The ide will create the [path_to_non_existent_dir] and use it as the user directory.
-
Run the IDE and note down the usedir from the Details tab in the About box as specified in the blog. Close the IDE. Open the Windows Explorer and rename the [userdir] to something like [userdir].bkp. Run the IDE via the standard desktop icon or start menu item. The IDE will find [userdir] does not exist and will create [userdir].
If you do not wish to save the current user directory, simply delete the directory. The ide will recreate the directory upon next startup. - Modify the user directory value in the conf file to permanantly set the userdir to a different directory.
-
-
It is possible to have several user directories with different settings and to switch between them using "-userdir" option while invoking the ide.
Posted at 03:35PM Jan 30, 2006 by karthikr in NetBeans | Comments[0]