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.
I used to have Eclipse in a folder but then I decided to move the folder for Eclipse into a different folder. I deleted the old folder because I no longer needed it. Now Eclipse creates the old folder it used to be located in every time I start Eclipse.
Just to be clear: Eclipse is in folder "eclipse stuff" which got moved from folder A to folder B (both are on the Desktop) and folder A got deleted and now when Eclipse is opened it creates "Desktop\A\eclipse stuff\" with a sequence of folders within it.
My best guess is it is storing default settings in there (based on the names of the things in the folders) and that the directory it stores these "default settings" in is somewhere in Eclipse's settings. I don't know what settings it would be in. How can I change this setting?
You need to switch the workspace. File -> Switch Workspace -> other and choose the new folder. Restarting should preserve the new default workspace. If not, you can also delete old workspace locations in Eclipse setting: Window -> Preferences => General -> Startup and Shutdown -> Workspaces contains a list of all known workspaces. You can delete it there.
I want to create several workspaces which point to different branches of a codebase.
The problem I am facing is every time I need to create a new workspace I have to do the same configuration for each workspace.
Example:
Setting up tomcat configuration and it's related java options such as library and java agent settings.
A system variable that points to specific folder containg my jar files.
Another system variable
Questions:
is it possible to have these setups done once so that all subsequent workspaces do not need to be configured?
is it possible to export these preferences and import later into any workspace either on my machine or other machine?
System information:
Windows 7, Eclipse 3.5, Sysdeo tomcat plugin, Tomcat 6
While eclipse does have an Export preferences option, it does not export everything and specifically it is not comprehensive enough for workspace duplication.
In the past I have had a lot of success just cloning the physical workspace folder itself.
For example, let's say you have setup the workspace with everything that you want in it. To duplicate it, find out the path of the current workspace folder by going to File -> Switch workspace -> Other. The path shown here in the dialogue that pops up is the current workspace path ( don't press ok yet)
Create a copy of this folder. Now to use this copy, just use it in the above dialogue, i.e., go to File -> Switch workspace -> Other and put in the path of the copy. Press OK and Eclipse shall restart with the new workspace. Now the only thing you will have to do is point the code to a different branch. Rest all the settings should be present already.
This works specially well on the same machine. If you copy this workspace folder it should still work but your mileage may vary.
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.
Where can I change the default workspace in Eclipse?
If you mean "change workspace" go to File -> Switch Workspace
I took this question to mean how can you change the Default workspace so that when Eclipse boots up the workspace you want is automatically loaded:
Go under preferences then type "workspace" in the search box provided to filter the list. Alternatively you can go to General>Startup and Shutdown>Workspaces.
There you can set a flag to make Eclipse prompt you to select a workspace at startup by checking the "Prompt for workspace at startup" checkbox.
You can set the number of previous workspaces to remember also. Finally there is a list of recent workspaces. If you just remove all but the one you want Eclipse will automatically startup with that workspace.
Go to eclipse\configuration\
Open the file "config.ini"
Modify the line
osgi.instance.area.default="F:/Workspace/Java"
where "F:/Workspace/Java" should be your default workspace!
If you are talking about changing the working directory for a java program that you launch from within eclipse, then there's a space for that in the run configuration.
If you go to Run menu and select "Run Configurations..." then select your run configuration, then on the "Arguments" tab for a Java Application there is a place for you to edit the "Working directory". This alters the current directory that will be used for launching the java program.
See related question Default eclipse working directory if this is what you are meaning.
Whatever Frank has suggested to change in config.ini is correct. In case, if that didn't help, you need to remove path from recent workspace as below.
Go to eclipse\configuration\org.eclipse.ui.ide.prefs\
Open the file "org.eclipse.ui.ide.prefs"
Remove the first path in RECENT_WORKSPACES.
MAX_RECENT_WORKSPACES=5
RECENT_WORKSPACES=/Users/wrokspace1\n/Users/wrokspace2\n/Users/wrokspace3\n/Users/wrokspace4
RECENT_WORKSPACES_PROTOCOL=3
SHOW_WORKSPACE_SELECTION_DIALOG=false
eclipse.preferences.version=1
File > Switch workspace > add the workspace you like > Eclipse will restart using the workspace you wanted.
If you mean to change the directory in which the program execution will occur, go to "Run configurations" in the Run tab.
Then select your project and go to the "Arguments" tab, you can change the directory there. By default it is the root directory of your project.
Open a command prompt.
Change to the eclipse home directory and type "eclipse -clean"
e.g.
C:/eclipse>eclipse -clean
This will ask for the workspace selection. It will also force to set it as the default workspace.
Then, go to eclipsehome-->configuration-->settings folder.
open org.eclipse.ui.de.prefs in a notepad.
set this property to true from false.
SHOW_WORKSPACE_SELECTION_DIALOG=true
You will be asked for a workspace selection everytime.
If you want to change recent workspace manually in a configurationfile
org.eclipse.ui.ide.prefs exists in
eclipse > configuration > .settings > org.eclipse.ui.ide.prefs
open this file in an editor find RECENT_WORKSPACES in line #2 and in this line you can see recent workspaces and can change or even remove them.
In Eclipse, go to File -> Switch Workspace, choose or create a new workspace.
This is the only answer you got first when you search for default workspace, but any solution is not solved my problem, So I follow this step for a default workspace:
First copy shortcut icon for your eclipse.
Right click and go to properties,
add your workspace path with -data attribute,
In Target:
D:\eclipse_path\eclipse.exe -clean -data D:\workspace_path\workspace
For using the same shortcuts and preference into this workspace,
Export general --> preference from your working eclipse, it will generate one .epf file.
So, just import .epf file into your new workspace, and you are done.
If you want to create a new workspace - simply enter a new path in the textfield at the "select workspace" dialog. Eclipse will create a new workspace at that location and switch to it.
On Ubuntu I went to
~/.eclipse/org.eclipse.platform_4.3.0_1473617060_linux_gtk_x86_64/configuration/config.ini
and added this line at the bottom
osgi.instance.area.default=#user.home/workspace
and changed workspace to the dir path from my home to where I put my workspace.
I combined #Frank answer with #Ronan Quillevere's comment
My kepler eclipse went into not responding at boot (shortly after installing GAE support) which I traced to a corrupt workspace. I fixed this by closing kepler, renaming the workspace directory (in use) so kepler starts normally without a workspace, then used file >> switch workspace to generate new workspace. Then started populating that with my old projects that I still needed.
You can check the option that shows up when you start eclipse. Please see the figure below