How to move NetBeans Workspace? - netbeans

I have installed NetBeans in C drive and now I want to move it to another drive.
Is there any option available in NetBeans?

There is the option of project group.
File > Project group.
Here you can create a project group based on a folder location.
Then you can switch between projects within selected group.
Switching between project groups doesn't require closing the IDE.
It look like Workspace for Eclipse.
Hope it will help!

Right click on your project
In the context menu, select "Move..." option
Choose the location you want to move your project to

You want to copy the so called "userdir".
For details, please refer to the FAQ:
http://wiki.netbeans.org/FaqWhatIsUserdir
http://wiki.netbeans.org/NetBeansUserFAQ#Configuration

I am using NetBeans 8.0.2 on Windows 7.
The projects in my workspace are also in a "Project Group" by root directory for a suite of projects. (What Eclipse would call a "workspace" for all projects, or a "Working Set" for a subset of projects.)
In C:\Users\<myname>\AppData\Roaming\NetBeans\8.0.2\config\Preferences\org\netbeans\modules\projectui\groups\<mygroup>.properties is listed the path to the group of projects.
In Explorer, move (: or copy if you are paranoid enough :) your workspace directories to the new drive.
Edit this file and change the drive location for the group.
NetBeans will now see the new location when it opens and loads the workspace and groups.
Use File / Project Groups ... to ensure you are looking at the group you think you are looking at.

Related

Eclipse projects are not visible in workspace folder

The weird part is I can see my projects through package explorer.
I can also export them.
But when I want to access them elsewhere e.g windows explorer, they are not there.
All I see is .metadata folder.
An unexpected shutdown of the system occurred not too long ago.
Edit: When I switched the workspace, created and opened a project, they're still not visible/accessible outside of the eclipse project explorer.
Any ideas?
You most likely haven't ticked "Copy projects into workspace" checkbox option.
File -> Import -> Existing projects into workspace:
It is possible that the projects were not put into the default, workspace folder.
To check this, right click on such a project, select Properties (it is usually available at the bottom of the list), go to the Resources tab, where you have the location of the project files displayed.
Obviously, there is a problem with Windows explorer and OneDrive in particular.
When I navigate to C:/Users/username/OneDrive/Documents/workspace or through command line I do see my eclipse projects.
But when I try to use 'Open file..' option from any application or navigate through Windows explorer, projects are not recognized nor displayed.

What is the runtime-EclipseApplication folder for, and can I delete it safely?

I'm trying to organise the directory structure of my projects' source code and the eclipse workspace etc.
I found a folder called runtime-EclipseApplication in a high level folder outside the directories where I keep my workspace and projects.
What is this folder, when/why is it created and is it safe to delete?
This is the default for the workspace name when you use Run As > Eclipse Application.
You can look in the Eclipse Applications section of the Run > Run Configurations dialog to see what (if anything) is using this workspace. The workspace name is shown in the Location field of the Main tab.

Where are projects stored in Eclipse?

The Project Explorer is able to list all projects in Eclipse. I am wondering where the project information gets stored?
The projects can be found under the .metadata directory of your workspace:
[eclipse-workspace]/.metadata/.plugins/org.eclipse.core.resources/.projects
Each project contains a .location file (in binary format) which presumably tells eclipse where the project is located on the filesystem, if it has been imported.
By default projects in Eclipse are stored under your workspace. You get asked where your workspace is created or which one to open whenever you open Eclipse, but you can configure it to not ask you again.
If you configured Eclipse not to ask again, then you can go to General -> Startup and Shutdown -> Workspaces in your preferences and check "Prompt for workspace on startup".
That page also lists your recently used workspaces (with probably just 1 entry, if you never explicitly specified a different one).
Note that you can also create projects that are located outside of your workspace, by explicitly specifying a separate location per-project.
Browse over to your workspace folder. You will see a folder for each project.
(Don't know where your workspace folder is? Try File -> Switch workspace... and it will give you the path.)
In Windows, usually C:\Users\%USERNAME%\workspace
Where %USERNAME% is the username given to your computer. eg. john
You can paste the above path in Run(Windows + R) window and it will pick the username automatically for you though.
For Eclipse Kepler SR2 on Windows 7
The easiest way to retrieve general info about a project (e.g., its location), see the following:
go to your "Package Explorer" view;
right-click on your project top-hierarchy folder;
choose "Show In" -> "Properties";
and you'll get the list of properties for that project in the "Properties view". Location of project will be in there.
On a Windows PC, you should be able to find your projects under C:\Users\yourname\workspace\. If you're on Linux, it should be under /home/yourname/workspace/.
I used the "Try File -> Switch workspace" suggestion which works but also re-installed Eclipse 0_0

Moving project to another folder in Eclipse

I generally have my working projects sitting on folders on my Desktop. When they are completed I just move them to a c:\dev\. The thing is I'm doing it in a rather archaic way.
1. move project files
2. delete project on Eclipse
3. create new project on Eclipse on the new location
How to you guys move projects around?
If I could alter the: File -> Properties -> Resource -> Location path it would be dead simple!
Example move:
c:\user\desktop\project_123
c:\dev\project_123
Right click on the Eclipse project in the Package Explorer, select Refactor, then select Move... In the dialog that comes up, enter or navigate to the new location and click OK. This will also preserve your CVS or other SCM metadata, but will also bring all your modifications as well, and you won't lose any memberships in Working Sets, launch configurations, or other things that Eclipse associates with your project.
Use Eclipse's Move menu item
Open Navigator view, right click on your project and click Move. Then select the destination directory.
Navigator View > Right Click > Move
Note it doesn't seem to work in Package Explorer (at least not in Neon). The move dialog from Package Explorer is different, so use the Navigator window.
I don't know whether eclipse has made modifs since the date of this post...
In my case I had moved a project folder manually and I wanted Eclipse to open the project on this new location. This is what I did (and it seems to work).
(I'm using eclipse "helios" v 3.6.2)
File menu | Import ...
General | Existing projects into Workspace
Select root directory = top directory of your project on the new location
Finish
I rarely have any projects in Eclipse that aren't under source control, so all I would need to do is check the project out in the new location.
If you don't have source control, Eclipse works with CVS rather well out of the box, and it's pretty simple to setup CVS to run locally without a server: http://www.tortoisecvs.org/faq.html#cvsinit
WHEN EVERYTHING ELSE FAILS:
Copying an Eclipse project from one directory (let's call it old_dir) to another directory (let's call it new_dir):
Open Eclipse and specify the copied working directory in your new_dir.
Once it opens the project in the this new_dir, the projects listed under Project Explorer Tab might still be the ones contained in the old_dir (you can check it by right clicking each and following through: "Resource -> Linked Resource" to see the Path Variables values). Thus, they have to be removed from this work space. Delete the Nios 2 Application Project and the BSP Project from the Project Explorer Tab by right clicking on it and selecting Delete option which will pop a new window. In the pop-up window, make sure that the Delete project contents on disk check box is UNCHECKED before clicking OK to delete the Projects. Otherwise, it will delete it from the old_dir where you copied the project from.
Right click in the Project Explorer Tab Area → Import → General → Existing Projects into Workspace and add the copied Nios2 Application Project and the BSP Project from the new_dir.
Right click in the Project Explorer Tab Area → Index → Rebuild, otherwise the Nios2 Application Project will not be able to use the includes provided by the BSP Project.
Click on Project → Clean → OK to clean and rebuild the whole project.
When using console to talk to the NIOS, make sure elf's path is updated to the new project directory as well!
Right click on your project->copy.
right click in project explorer free space and right click->pase.
chose new folder and project name.
I copied the whole project to a new directory. After setting Eclipse to the new workspace it recognises the project instantly. Thus it was nothing further to do. I use Eclipse IDE for C/C++ Developers, Version Luna Service Release 2 (4.4.2).
For Eclipse Oxygen, to move a Java project, djb's accepted answer works well (in my experience just now), except having read comment by Basic May 14 '12 at 9:27, I tried to add my project XMLDiff to C:...\SVN\trunk\Internal Projects, and I got a failure with the rather cryptic message:
Problems encountered while moving resources.
Resource already exists on disk.
I had to move the project to C:...\SVN\trunk\Internal Projects\XMLDiff by creating a new folder, XMLDiff, in the browse dialog, and the result was C:...\SVN\trunk\Internal Projects\XMLDiff, not C:...\SVN\trunk\Internal Projects\XMLDiff\XMLDiff.
So this must have changed between Basic's experience in 2012 and Eclipse.3.
For Eclipse Oxygen
Project Properties -> Resource -> Linked Resources -> Linked Resources (Tab)

Aptana/Eclipse: How do I make a project that uses existing files on my filesystem, instead of copying?

I want to create a project that uses source files already on my filesystem, but the IDE always wants to create a directory and make a second copy of all the source.
This has always annoyed me about Aptana and Eclipse, is there a workaround for this?
I am using Aptana Studio 3 on my mac and the way I do it is:
Click on File
Select Import from the dropdown menu
Select the General tab and open it, you will see the option Existing Folder as New Project
Select it and click on Next
On the next page select the folder where you have the old project files, name the new project(if you want to change it). You can also select the languages that you have used on the project.
Click Finish and you are set to go.
One small addendum, the existing folder doesn't actually need to be in your workspace. I have several projects in my workspace but also several located elsewhere for assorted reasons.
have the files in a directory under your workspace
use "create project" and change the default folder to the one created above.
I too wasn't aware of how to do this..
But i tried this way and it worked..
Step 1: Try to create new workspace with the name and location as you wish
Step 2: click new->Java Project
Step3: In the create a Java Project Window select the option for Creating from existing Resource" and select the resource you want
Step4: You can see the project name as automatically set by itself based on the folder containing the project that you select.
Step5: click finish
Step 6: I guess, you need to open Navigator view(Window->show view-> navigator) for best viewing
Hope this works gud.. Post here if its not working,..
There is a checkbox named "Prompt for workspace on startup". It's in Window -> Preferences -> General -> Startup and Shutdown -> Workspaces. If you check this, on next Aptana startup you will be prompted to define a new Default workspace directory which would be your default projects folder.
There is also another way to do that.
Create an empty project (right-click in the Project Window and go to "New->Project" and then "General->Project" and click "Next", after that type in a project name and click "Finish").
Add a new connection to this project (right-click on "Connections" and then "Add New Connection"). The "Source" should be your project and the "Destination" should be the type "Filesystem" with a folder of your choice.
Finished.
I only use that method in very rare cases, as example, if u need a simple file-reference of any folder on your harddrive or if you need an overall file-reference to your workspace folder which contains all project folders, etc..
This answer by no means solves the issue above in Aptana but if you are in a rush, try using FreeCommander http://www.freecommander.com. It is a dual pane file manager with a slew of options. I have been using it for almost 3 years and there is never a day I don't use it.
What I did for now, is I allowed Aptana to create a folder in the workspace at the same level as the original folder I would like to use. Using FreeCommander I then have the original (src) folder in one pane with the new folder (dst) in the other pane.
I then manually copy (F5) or use FreeCommander's built in sync function (Alt + s) so that both folders have the same contents at all times.
Again, not the right answer but a workaround as work needs to be done. Cheers.