Question

By default netbeans stores it's settings in a directory called .netbeans under the user's home directory. Is it possible to change the location of this directory (especially under Windows)?

Thanks to James Schek I now know the answer (change the path in netbeans.conf) but that leads me to another question: Is there a way to include the current username in the path to the netbeans setting directory?

I want to do something like this:

netbeans_default_userdir="D:\etc\${USERNAME}\.netbeans\6.5beta"

but I can't figure out the name of the variable to use (if there's any). Of course I can achieve the same thing with the --userdir option, I'm just curious.

Was it helpful?

Solution

yes, edit the netbeans.conf file under %NETBEANS_HOME%\etc.

Edit the line with: netbeans_default_userdir="${HOME}/.netbeans/6.0"

If you need different "profiles"--i.e. want to run different copies of Netbeans with different home directories, you can pass a new home directory to the launcher. Run "netbeans.exe --userdir /path/to/dir" or "nb.exe --userdir /path/to/dir"

OTHER TIPS

"HOME" is the only variable supported by the IDE. When deploying a custom application using the Netbeans Platform, "APPNAME" is also supported out of the box.

For someone who lands up here hunting for an answer:

If you are trying to setup a portable version in windows, Netbeans 7.2 and up wont start if userdir is at the same level or lower than the Netbeans root.

So if you have: c:\Portable\Netbeans you can NOT do netbeans_default_userdir="c:\Portable\Netbeans\userdir\8.0"

Use a folder OUTSIDE netbeans installation e.g. netbeans_default_userdir="c:\Portable\NetbeansUserDir\8.0"

for cache it does not matter.

Tested in Windows 8.1 and 7.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top