FaqAlternateUserdir
Can I run NetBeans with an alternate "userdir"? Can I move the .netbeans directory?
Yes. Running NetBeans with a non-default userdir can be useful in various scenarios:
- You want to temporarily run NetBeans with different settings (window layouts, font settings, etc.) and revert to the default later.
- You want to run multiple instances of the same NetBeans version simultaneously .
- You've run into problems and want to exclude the possibility of corrupted settings. When evaluating a bug report, NetBeans developers often ask if the problem is reproducible with a clean userdir - this is what they mean.
- Your default installation is on a slower drive, and you want the userdir to be located on a faster one.
Changing the userdir
You can specify the new location for the .netbeans userdir via the --userdir <path> startup option when starting NetBeans. New userdir location cannot be in Netbeans folder. Learn how to make startup options permanent .
The <path> argument may refer to an existing or a new folder name. If pointing to an existing dirctory, it will be reused. If you provide a non-existent path, a new userdir will be created by NetBeans.
NetBeans 7.1 permits a --cachedir <path> option to store the IDE's "caches" elsewhere, such as on a fast local disk rather than a slow but backed-up network drive. The cache consists of files that may become large; may change frequently; and can be freely deleted and recreated. For example, the results of the Java classpath scan would live in the cache.
Examples
- Windows:
netbeans.exe --userdir C:\MyOtherUserdir
- Unix:
./netbeans --userdir ~/my-other-userdir
- Mac OS:
/Applications/NetBeans.app/Contents/MacOS/executable --userdir ~/my-other-userdir
Applies to: NetBeans 3.6, 4.x, 5.x, 6.x, 7.0, 7.1
Platforms: All