php 如何更改默认的 Netbeans 7 项目目录?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1266792/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to change the default Netbeans 7 project directory?
提问by camomileCase
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.
是否可以更改 Netbeans 7 中的默认项目目录?我不知道它是否相关,但我有 PHP Netbeans 发行版。
Thanks!
谢谢!
回答by Vova Popov
In new netbeans 7 search file: D:\Users\YourWindowsUserName\.netbeans\7.0\config\Preferences\org\netbeans\modules\projectui.properties
在新的 netbeans 7 搜索文件中:D:\Users\YourWindowsUserName\.netbeans\7.0\config\Preferences\org\netbeans\modules\projectui.properties
Delete: *RecentProjectsDisplayNames.*8, *RecentProjectsIcons.*8, *recentProjectsURLs.*8 for cleaning recent projects.
删除: *最近的项目显示名称。*8, *最近的项目图标。*8, *最近的项目网址。*8 用于清理最近的项目。
Change projectsFolderfor default projects folder when creating new one
更改projectsFolder默认的项目创建一个新的文件夹时
To find out the location of the projectui.properties file for the latest versions of NetBeans for various operating systems:
要查找适用于各种操作系统的 NetBeans 最新版本的 projectui.properties 文件的位置,请执行以下操作:
回答by mnicky
Under Linux, you can change it in the Netbeans configuration directory: .netbeans/6.8/config/Preferences/org/netbeans/modules/projectui.properties
Linux下,可以在Netbeans配置目录下修改:.netbeans/6.8/config/Preferences/org/netbeans/modules/projectui.properties
回答by Kevin Crowell
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.
我相信 Netbeans 会记住您上一个项目的创建位置并将其用作默认值。因此,如果您创建一个项目并选择与默认目录不同的目录,那么该目录现在将成为默认目录。
回答by GoingDrupal
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.
Run > Set Main 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.
这将在文件窗口中以粗体突出显示项目文件夹的名称,通常在您的左侧。
回答by gabrielk
Instructions for Mac, based on some of the answers above:
Mac 的说明,基于上面的一些答案:
Make sure NetBeans is closed.
确保 NetBeans 已关闭。
On a Mac, the edit ~/.netbeans/7.0/config/Preferences/org/netbeans/modules/projectui.properties
在 Mac 上,编辑 ~/.netbeans/7.0/config/Preferences/org/netbeans/modules/projectui.properties
Look for a line that starts with projectsFolder=
查找以开头的行 projectsFolder=
Example:
例子:
projectsFolder=/Users/<your username>/NetBeansProjects
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.
如果此行不存在,请将其与要使用的目录的完整路径一起添加。当然,如果它已经存在,只需将其编辑到您想要的路径即可。
回答by Marcio Mazzucato
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.
在较新的版本中,在“项目”选项卡中右键单击要移动的项目,然后单击“移动”。这将允许您将项目移动到新目录。


回答by Jesse Chisholm
If you just want to move the projects in a Project Group, then do this:
如果您只想在 a 中移动项目Project Group,请执行以下操作:
( I am using NetBeans 8.0.2 )
(我使用的是 NetBeans 8.0.2)
( I have a Project Groupbased on root directory, and I imported all projects under that directory. )
(我有一个Project Group基于根目录,我导入了该目录下的所有项目。)
- Use Explorer to move (: copy if paranoid :) the projects' directories to the new location.
- Edit the file
C:\Users\<yourName>\AppData\Roaming\NetBeans\8.2.0\config\Preferences\org\netbeans\modules\projectui\groups\<theGroup>.properties - Change the path entry to the new location.
- Open NetBeans and make sure
Files / Project Groups ...is looking at the group of projects you think it is.
- 使用资源管理器将项目目录移动 (: copy if paranoid :) 到新位置。
- 编辑文件
C:\Users\<yourName>\AppData\Roaming\NetBeans\8.2.0\config\Preferences\org\netbeans\modules\projectui\groups\<theGroup>.properties - 将路径条目更改为新位置。
- 打开 NetBeans 并确保
Files / Project Groups ...查看您认为的项目组。
回答by themikeybee
I use Netbeans 7.0.1 on Windows 7.
我在 Windows 7 上使用 Netbeans 7.0.1。
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!
对我来说, projecui.properties 文件在C:\users\.netbeans\7.0\config\Preferences\org\netbeans\modules\目录中。大约第四行下面是一个名为projectsFolder. 只需将其更改为您想要的文件夹即可!
Caveat: this is Java, so if you have a backslash, you have to double it up (C:\folderwould 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
警告:这是 Java,因此如果您有反斜杠,则必须将其加倍(C:\folder将是C:\\folder)。似乎我之前在应用程序本身中这样做过,但我终生找不到它。我意识到这是一个旧线程,但这是我第一次在谷歌上搜索我的问题,所以我相信其他人也会如此。-麦克风
回答by Quasaur
On my Windows 7 it's Users\\AppData\Roaming\NetBeans\7.2.1\config\Preferences\org\netbeans
在我的 Windows 7 上它是 Users\\AppData\Roaming\NetBeans\7.2.1\config\Preferences\org\netbeans
回答by Mark Longmire
On Windows you could find that file in:
在 Windows 上,您可以在以下位置找到该文件:
[%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.
找到了这个http://wiki.netbeans.org/FaqAlternateUserdir,但没有成功。netbeans.conf 中的命令行值和 netbeans_default_userdir 都没有持久化到 projectui.properties。

