Note: These pages are being reviewed.
What is the user directory, what is in it, and why do I need one?
The userdir is a directory passed to NetBeans on startup by the launch script. You can specify it on the command line, e.g.:
It contains configuration data that allows NetBeans to restore its state after shutdown;
it also contains log files and other miscellaneous artifacts of running NetBeans.
config/ subfolder of the userdir
is where changes made at runtime to the system filesystem (DevFaqSystemFilesystem)
Some new modules installed by Plugin Manager will also be installed here, as if it were a "cluster" directory (such as
platform or similar in a NetBeans IDE or Platform installation). NBMs which specify a particular cluster name will not be placed in the user directory, however.
It is expected that applications built on the NetBeans platform will provide a custom launch script which will specify the userdir such that it does not overlap with any other platform-based application. This is done for you if you use the stock launchers created by "suite" projects in the IDE.
Only one running copy of NetBeans may use a single userdir at a time; during startup, the platform checks a lock file and if it is present, tries to contact the running instance via a socket, to determine if the lock file is stale or not. If it does not make contact, it will display a warning and ask the user if startup should continue. This same protocol also supports command-line options.
You can find the path to the userdir at runtime if you need to,
using the system property
Most modules should not do this;
Places.getUserDirectory to find the userdir or use
to work with the
Applies to: NetBeans 6.7 and later
Apache Migration Information
The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.
This page was exported from http://wiki.netbeans.org/DevFaqUserDir , that was last modified by NetBeans user Frederic.deniger on 2012-11-01T17:21:20Z.
NOTE: This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.