camomileCase
camomileCase

Reputation: 1706

How to change the default Netbeans 7 project directory?

This is only a minor annoyance but if I can figure this out I'll be very happy.

Is it possible to change the default project directory in Netbeans 7? I don't know if it's relevant but I have the PHP Netbeans distro.

Thanks!

Upvotes: 27

Views: 64854

Answers (10)

themikeybee
themikeybee

Reputation: 11

I use Netbeans 7.0.1 on Windows 7.

For me the projecui.properties file was in C:\users\.netbeans\7.0\config\Preferences\org\netbeans\modules\ directory. About the fourth line down is a property called projectsFolder. Just change that to the folder you want and you're done!

Caveat: this is Java, so if you have a backslash, you have to double it up (C:\folder would be C:\\folder). It seems like I did this before within the application itself, but I could not for the life of me find it. I realize this is an old thread, but it was my first hit googling my problem, so I'm sure others will as well. -Mike

Upvotes: 1

Jesse Chisholm
Jesse Chisholm

Reputation: 4005

If you just want to move the projects in a Project Group, then do this:

( I am using NetBeans 8.0.2 )

( I have a Project Group based on root directory, and I imported all projects under that directory. )

  1. Use Explorer to move (: copy if paranoid :) the projects' directories to the new location.
  2. Edit the file C:\Users\<yourName>\AppData\Roaming\NetBeans\8.2.0\config\Preferences\org\netbeans\modules\projectui\groups\<theGroup>.properties
  3. Change the path entry to the new location.
  4. Open NetBeans and make sure Files / Project Groups ... is looking at the group of projects you think it is.

Upvotes: 2

Marcio Mazzucato
Marcio Mazzucato

Reputation: 9285

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.

Changing Netbeans Project Folder

Upvotes: 3

Quasaur
Quasaur

Reputation: 1365

On my Windows 7 it's Users\\AppData\Roaming\NetBeans\7.2.1\config\Preferences\org\netbeans

Upvotes: 1

Vova Popov
Vova Popov

Reputation: 1063

In new netbeans 7 search file: D:\Users\YourWindowsUserName\.netbeans\7.0\config\Preferences\org\netbeans\modules\projectui.properties

Delete: *RecentProjectsDisplayNames.*8, *RecentProjectsIcons.*8, *recentProjectsURLs.*8 for cleaning recent projects.

Change projectsFolder for default projects folder when creating new one

To find out the location of the projectui.properties file for the latest versions of NetBeans for various operating systems:

http://wiki.netbeans.org/FaqWhatIsUserdir

Upvotes: 31

GoingDrupal
GoingDrupal

Reputation: 411

If you are asking for how to set the main project so that it runs by default and is debugged by default, then:

Run > Set Main Project, and select your project.

This will highlight in bold the name of the folder of your project in the files windows, usually on your the left hand side.

Upvotes: 5

Mark Longmire
Mark Longmire

Reputation: 1160

On Windows you could find that file in:

[%USERPROFILE%|$Env:UserProfile]\.netbeans\...\projectui.properties

Found this, http://wiki.netbeans.org/FaqAlternateUserdir, but did not have success with it. Neither the command line value nor netbeans_default_userdir from netbeans.conf were persisted to projectui.properties.

Upvotes: 0

gabrielk
gabrielk

Reputation: 563

Instructions for Mac, based on some of the answers above:

Make sure NetBeans is closed.

On a Mac, the edit ~/.netbeans/7.0/config/Preferences/org/netbeans/modules/projectui.properties

Look for a line that starts with projectsFolder=

Example:

projectsFolder=/Users/<your username>/NetBeansProjects

If this line does not exist, add it with the full path to the directory you want to use. And of course, if it already exists just edit it to your desired path.

Upvotes: 4

mnicky
mnicky

Reputation: 91

Under Linux, you can change it in the Netbeans configuration directory: .netbeans/6.8/config/Preferences/org/netbeans/modules/projectui.properties

Upvotes: 9

Kevin Crowell
Kevin Crowell

Reputation: 10180

I believe that Netbeans will remember where your last project was created and uses that as its default. So if you create a project and choose a different directory than the default, then that directory will now be the default.

Upvotes: 5

Related Questions