How to Change the Default Netbeans 7 Project Directory

How to change the default Netbeans 7 project directory?

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

How to change the default Netbeans 8.0.2 project directory?

May be this will help you

  1. Edit the file C:\Users\<YourName>\AppData\Roaming\NetBeans\8.2.0\config\Preferences\org\netbeans\modules\projectui\groups\<TheGroup>.properties.
  2. Change the path entry to the new location.

How to change the default project directory (folder) in Netbeans 6.9?

I don't think you can make it module-specific but you can set it as follows:

  1. Close NetBeans
  2. Find the projectui.properties file. For me (Windows) it was under C:\Documents and Settings\Catchwa\.netbeans\6.9\config\Preferences\org\netbeans\modules\projectui.properties
  3. The projectsFolder=C:\\NetBeansProjects variable is I think what you want to change.

how do i change default sources folder in Netbeans 7.1.2

If you are using Windows 7 or vista, you are gonna find it here C:\Users\YourUserName\AppData\Roaming\NetBeans\7.1.2\config\Preferences\org\netbeans\modules\projectui.properties.

However if you you are using windowsXP remember the USERPROFILE enviromental variable is not Users but rather Documents and Settings. Enviromental variables change depending on the operating system you are using. To know whats the USERPROFILE variable for yours just open a command prompt window and type SET USERPROFILE. Or you can simply type %USERPROFILE%\AppData\Roaming\NetBeans\$ENTER_YOUR_NETBEANS_VERSION_NUMBER_HERE\config\Preferences\org\netbeans\modules\projectui.properties and that will send you to the correct directory.

Change Netbeans default project folder to something other than nbproject

Obviously the folder name is hardcoded in several places within Netbeans, but you have options to work around that by placing the nbproject somewhere else, e.g. into a subfoler where it does not get on your nerves. Look at this old thread, specifically at this post. I cannot magically change hardcoded Netbeans stuff for you, but I would be happy if the solution I am pointing you to would satisfy your needs and answer the question.

How to change the default Open File... (folder) in Netbeans 8.2?

Unlike setting the default project directory in NetBeans, you can't modify the default Open File... directory because there is no such "default directory" to change.

NetBeans behavior when you select Open File... from the File menu (on Windows 10 at least) is as follows:

[1] On the first occasion within a NetBeans session the Documents icon will be pre-selected in the Open dialog window, and your Documents directory will be opened. That's just the way NetBeans works, and cannot be modified. Although you can change the Documents folder that will be opened, you probably shouldn't. See below for details**.

[2] Within the Open dialog you can obviously navigate to any alternative folder to open a file. Thereafter, within that NetBeans session only, that alternative folder will be opened by default on the subsequent File -> Open File... selections, until an alternative directory is selected.

~~~~~

** To change the Documents folder in Windows (which will also change the folder that NetBeans opens on the initial use of File -> Open File..):

  • In Windows File Explorer select Desktop -> This PC -> Documents and right-click.

  • Select Properties from the drop down menu, and then select the Location tab in the Document Properties window.

  • Enter the name of the new folder to be used as the Documents folder and click OK.

  • Restart NetBeans, select File-> Open File... and the folder NetBeans opens will now be the one you specified in the previous step.

That may appear to have the desired affect, but other Windows applications also use the Documents folder, and may depend on files in that folder, so it shouldn't really be changed without good reason. If you really need to open files in NetBeans that are not within any project the cleanest approach would be to place such files in the Documents folder if possible.

How can I change the source folder for a PHP project in NetBeans?

I've played around with this a bit and found out how to change the Source Folder for a PHP NetBeans project that has already been created. I'm using NetBeans 6.9 on Ubuntu.

I remember trying to do this with NetBeans 6.8 and ending up with various errors like project scans never completing and such.

However, it turns out that this time it was quite easy to do.

I had the nbproject folder inside my source folder. All I had to do was close the project and NetBeans itself, move the nbproject folder into the new source folder and restart NetBeans again. The project was re-scanned and everything seems to be working.

If you're trying to do this and you had the nbproject folder outside of your source folder, it would be worth looking at nbproject/project.properties file.

There's a line there with src.dir= on it. You should be able to edit this line to update the source location.

In my case I had src.dir=., which means the Source Folder was set to be whichever folder is parent to the nbproject folder.

How do you change a NetBeans project type after it has been created?

The project data is stored within the main project directory in a subdirectory named nbproject.

The file project.xml contains the main configuration data for the TYPE of the project. The type and data xml namexspace settings determine the basic project type. Here is a PHP version:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>codex-slp</name>
</data>
</configuration>
</project>

Here is an HTML5 project version:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.clientproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
<name>csa</name>
</data>
</configuration>
</project>

Note the line is different. The HTML 5 project uses the namespace org.netbeans.modules.web.clientproject. The PHP version is at org.netbeans.modules.php.project.

Also of note is the data xmlns entry with HTML5 pointing to the clientside-project directory while PHP points to the php-project directory.

How to change the project? Not easily. Your best bet:

  • Close out the NetBeans IDE.
  • Go to the project directory.
  • Remove (or rename) the nbproject subdirectory.
  • Open NetBeans.
  • Create a new HTML5 project from existing sources.

That will switch the project type from PHP to HTML5 and give you the corresponding dialogue boxes.

The reason I decided to take this approach is there are a lot of other things that hang off this namespace specification. The project.properties file, for example, has very different entries for a PHP project, thinks like the PHP version, that do not exist for the HTML5 project. The HTML5 project has new properties that are not present in PHP projects.

There is also an entire private subdirectory that has a plethora of options set in the private.properties file that contains things like the source remote connection for a PHP project that does not exist nor seem to even be SUPPORTED for an HTML5 project.

There are far too many disparities between the two project types to simply hack up the nbproject directory files and hope it works.

IMO your best option is to follow the steps above to recreate the project.

Sadly, it does not appear as though HTML5 project types have matured to the point of the PHP project types with things like supporting remote pull/push of changed files. For this particular project I've reverted back to the PHP project type even though this is not really a PHP project. I heavily rely upon the automatic remote server push via FTP. How did I restore the project? I renamed my nbproject directory to saved_nbproject, so to revert:

  • Close Netbeans.
  • Go to project directory.
  • Rename my saved_nbproject directory back to nbproject.
  • Restart NetBeans.

Maybe changing project types AND HTML5 remote server support will be available in the future. For now, with NetBeans 7.4 it does not appear this transition is readily available.

If anyone else has input or other feedback I'd love to hear it as NetBeans has become my go-to tool for complex code projects.



Related Topics



Leave a reply



Submit