Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'd like to change the Source Folder for a PHP project that I have set up in NetBeans 6.9. It doesn't look like NetBeans offers any easy way to do this. Does anybody know a way to make this happen?

Thanks...

like image 796
Mark Northrop Avatar asked Feb 15 '11 10:02

Mark Northrop


People also ask

How do I change the source folder in NetBeans?

1), look in the ~/NetBeansProjects// folder to find the "project. properties" file. Open this up in your favorite text editor and modify the file path "src. dir=" to your heart's content.

Where is project folder in NetBeans?

In NetBeans, select "File" from the menu bar, then "Open project..." and select the location where the file was saved from RobotBuilder. The project will be opened and you will see it in the "Projects" tab on the left side of the NetBeans window.


2 Answers

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.

like image 59
Mark Northrop Avatar answered Sep 16 '22 16:09

Mark Northrop


In Ubuntu 11.10 (with a standard script installed version of Netbeans 7.1.1), look in the ~/NetBeansProjects// folder to find the "project.properties" file.

Open this up in your favorite text editor and modify the file path "src.dir=" to your heart's content.

like image 34
jakimfett Avatar answered Sep 19 '22 16:09

jakimfett