Everytime i run eclipse IDE, its asks me to choose a new workspace. - eclipse

Every-time i run Eclipse IDE for Java EE, its asks me to choose a new workspace. If i choose the same workspace, it prompts "Workspace at 'E:/Projects' in use or cannot be created. Choose a different one". How can I avoid this and run on the same workspace? Also, when i try to save the project, it prompts me with "The User Operation is waiting" and some set of operations go on for sometime and then eclipse hangs. When i restart the eclipse, i will have to change the workspace. Please let me know how can i handle this?
Thanks in advance!

In Eclipse, you can open a secondary window by dragging a tab out to a blank region of the screen. You can't open another instance of the program, as the workspace gets locked by the first process. (There might be a Window->New Window option, but I don't have Eclipse installed so I can't check)

Related

Use same workspace for multiple eclipse instances at same time

I have two eclipse installed in my system. I want to run the two eclipse at same time and that should use the same workspace. But when I open the second eclipse instance it will prompt something like the workspace is in use. try different one . How can i achieve this?
Yes you can't open multiple instances of eclipse on a single workspace. But you can open multiple windows on a single workspace.
After first instance opened then click on Window > New Window option to open other eclipse window on the same workspace.

Eclipse opens blank workspace

I have this weird issue where the following happens:
fresh eclipse juno install (with all updates applied)
works fine for a while asking which workspace I want to open with a dialog on startup
after a few days it stops prompting me for workspace, opens blank made up workspace instead in /Users/myself/Documents
If I check "preferences -> workspace -> startup and shutdown" everything seems fine, the only workspace in the list is the one I created and the checkbox that says "don't prompt for workspace" is not checked.
This happened a few times already on fresh eclipse installations and fresh hard drives (same machine but I replaced the hard drive, re-installed OS and everything for other reasons and now it happened again).
I am on:
OSX 10.7.5
Eclipse Juno (Service release 2)
Any help appreciated!
I have exactly the same problem on OSX, for no reason, one fine day, Eclipse will start-up with a new blank workspace!
And to all the stupid answers and responders out there: YES I know how to set and select a default workspace! And NO creating a new workspace, re-importing lots of projects and loosing all my 30+ database connections under my Toad Extension, is not an option.
What I found is that
For some reason Eclipse creates a directory /Users/user_name/Documents/workspace which is the blank workspace it starts-up with (incorrectly)
My usual workspace is under /Users/user_name/Documents/Development/eclipse
The solution is (this is on Mac OSX, don't know if it is the same on Windows):
Goto your Eclipse directory where you run Eclipse from (mine is /Applications/eclipse)
In {eclipse_dir}/configuration open the file config.ini
Find the line osgi.instance.area.default=#user.home/... and confirm that it is pointing to the bogus workspace directory.
Modify the path of this entry to point to the correct workspace
Save the config.ini file.
Try starting Eclipse and it should open your workspace now.
If your Eclipse get stuck loading plugins now, goto your workspace directory and look for the .metadata directory (its hidden). Inside the .metadata directory, remove the .mylyn directory and restart Eclipse.
Once Eclipse started with the correct workspace loaded, do a proper Eclipse shutdown to ensure your workspace is closed and saved properly.
This worked for Eclipse Juno.
Hope this helps!
Just running this command helped me
eclipse.exe -data C:\Development\Eclipse\Workspace
FYI this happens due to install of some plugins.
This same problem happened to me on Windows on two separate Eclipse installations, without installing any plugin.
I was able to get my working Workspace by clicking on File > Switch Workspace, but closing and opening Eclipse again would reset it to a default Workspace.
What apparently solved this was to force Eclipse to save Workspace settings by ticking the Prompt for workspace on startup setting in General > Startup and Shutdown > Workspaces, which I had turned off.
The next time Eclipse opened, it asked me for the Workspace, and it had my correct one first in the list. I asked not to be prompted again for it and now it opens the right workspace when I launch Eclipse once again.
I solved this problem as per JJ-za's answer, except steps 2 and 3:
In {eclipse_dir}/configuration/.settings open the file org.eclipse.ui.ide.prefs (when Eclipse is not running)
Find the line RECENT_WORKSPACES= and confirm that the workspace is pointing to the correct workspace directory and that multiple workspaces are separated by \n

java was started but returned exit code = -805306369

Can anyone help me with this error:
java was started but returned exit code = -805306369
C:\Windows\System32\javaw.exe
-jar C:\Program Files\Java\eclipse-jee-helios-SR2-win32-x86_64\eclipse\plugins\org.eclipse.equinox.launcher_1.11.1.R36x_v20101122_1400.jar
Just had this issue, for me it was a corrupted workspace osgi cache. The solution was to run eclipse with the -clean parameter as
eclipse.exe -clean
After some time, eclipse required to clean up, the workspace selection dialog popped up and I could start eclipse normally again.
The -clean parameter is documented in the eclipse help
My problem was a corrupted workspace the solution was from Rob's link:
http://spacetech.dk/eclipse-failed-java-was-started-but-returned-exit-code-805306369.html
I started getting the same error "exit code = -805306369" just out of no where.
Eventually I looked at the Eclipse logs at the <workspace_directory>/.metadata/.log and realized that my Source Control plugin (Perforce in my case) was unable to connect and the eclipse was stuck.
This was because my eclipse was piggy back(depending) on the client connection that I have with my Perforce windows client and my Perforce client was not connected to the server. I connected my Perforce client and the eclipse started working normal.
this happens when mostly workspace is corrupted..... cooler solution is just to switch the workspace to safer location(new location).... and just import the project from previous workspace... princess can still be saved....
For me , Just change your Workspace to another one
I got this error, when workspace already setted up. Since the java virtual machine cannot be created. try command: java -version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I restarted my machine, and it solved my problem.
One of the class file in my project was corrupted. The name of a class file was too long and I was not able to delete or rename it, so I rename the folder containing it and then I was able to delete the project and that solved my problem.
Now i know that my workspace was corrupted, it solved my problem.
Go to your workspace and rename it.
Start your eclipse and by default it will create a workspace.
Go to File -> Switch Workspace, choose your original workspace.
I wasn't able to disable "Automatically find new updates and notify me." The option was not there on the Install/Updates page. Perhaps eclipse workbench has changed since that answer was written.
However, running eclipse with the -clean option in my old workspace did the trick for me. The way to do that in windows is to first find the directory where eclipse.exe lives. You can go to the start menu and in the "search menus and files" bar, type eclipse. You should see the purple globe icon pop up under "Programs." Hover your mouse over it and it will tell you the directory it exists in.
Then... open "computer" or some other window from the start menu and from there navigate to the window where eclipse is. Click your mouse in the bar at the top where the directory is displayed (somewhere not on the text). That directory will highlight. Now type cmd. A black command window will open and you will be in the directory where eclipse is. At the command prompt (drum roll) type eclipse.exe -clean
eclipse will start. Make sure it is asking to go to your corrupted workspace and click OK.
Wait for it and soon you will know if your workspace has been uncorrupted. Yay!
“java was started but returned exit code = -805306369” caused by Eclipse´s currupted workspace, I solved my problem with this 4 steps:
1) claose the eclipse.
2) Kill the adb from task manager.
3) Start your eclipse and by default it will create a workspace or start with new workspace.
4) Go to File -> Switch Workspace, choose your original workspace.
In my case, it is a work laptop, so pretty secure SOE
64 bit Win 7.
Unzipped Eclipse MARS onto a folder on "C" drive
Install failed consistently with Java error code -805306369
Created a separate folder on 'C' drive for workspace, granted
everyone full-control and that fixed it!!
I got same issue when opening files using shortcut - Ctrl+Shift+R.
I got it resolved by disabling "Automatic Updates".
Steps to disable automatic update in eclipse (helios): Windows >> Preference >> Install/Update >> Automatic Updates. Disable "Automatically find new updates and notify me".
How I managed to get mine working. I used a combination of the solutions above. It works for me.
Step 1: Change your workspace to some other names e.g. change it from workspace to workspace1.
Step 2: Access your eclipse and stop automatic updates (provided that you could access after changing your workspace)
Step 3: Exit your eclipse with workspace1
Step 4: Start your eclipse with former workspace by entering eclipse.exe -clean (if you are using others then use e.g. MuleStudio.exe -clean)
In conclusion, using a combination of solutions such as changing workspace, stop automatic updates and -clean work for me. Try it yourself.

Eclipse: Open in New Window

In Package Explorer I right-clicked on project and selected "Open in New Window". New Eclipse window was opened with that project. Then I closed old, "main" Eclipse window, so only new "project" window remained.
Now each time I launch Eclipse I have this "project" window with project name in window title and Package Explorer drilled down into this project. And I need to press "Up" button in Package Explorer to see all my projects.
How can I restore default behaviour and launch Eclipse with workspace scope and not project?
My original answer: Once you get the Package Explorer the way you want it, if you exit Eclipse cleanly it should come back that way.
My revised answer: It looks like a bug, even if you exit cleanly it comes back inside of the project. And in fact when you create a new window no matter what it puts you into the project. Even if you switch to the project explorer.
I found a way to fix it though, do a Window -> Close All Perspectives, then open the Java perspective and exit and come back in and you should be OK. I have filed this bug about it.
Close the project properly " File --> Close All", Then restart eclipse.
OR you can create a new work space " File --> Switch Workspace --> Other..."
Im not sure this is what you are looking for but the Documentation offers a command line option to select the start workspace:
The workspace is the physical location (file path) you are working in.
You can choose the workspace during startup of Eclipse or via the menu
( File → Switch Workspace → Others.

eclipse: explicitly saving project / workspace

Is there a way to force Eclipse to save project / workspace settings? I can't find a "save workspace" or "save project" command.
(I've never had a problem with this in Eclipse, but TI's Code Composer 4 is based on Eclipse and it sometimes crashes and doesn't retain the changes I made in project settings.)
The surest way to force such a save would be to switch workspace.
Switch to an empty workspace, and then switch back to your current workspace: every project settings should have been saved and restored.
Note: the bug 27821 ([Workbench] saving state and preferences) is a duplicate of:
bug 2369 ([Workbench] Would like to be able to save workspace without exiting), which is opened since... 2001!
So even the "switching workspace" trick might not be enough to save every settings, but that is a start.
Edit September 2011:
Aaron Digulla add in the comments he has added a plugin 'saveui' (bug 337593, which duplicates bug 2369), and which could be a good solution to save your workspace state (without having to close your Eclipse or switch your workspace).
To use this plugin, download the code, open the archive, copy the "dropins" folder into your "eclipse" folder (possibly merging with the existing dropins folder), close Eclipse, and re-open Eclipse. You should see a small lock-like icon in the toolbar, just below the menus. Clicking this icon is supposed to save the workspace.
The place where is a workspace - workbranch is in
Workspace\.metadata\.plugins\org.eclipse.e4.workbench\
You can use wakeup() method to force save workspace
Job[] jobs = WorkbenchJob.getJobManager().find("WorkbenchAuto-Save Job");
Job workspaceJob = Arrays.asList(jobs).get(0);
workspaceJob.wakeUp();