Reputation: 45
How to make eclipse refer to workspace in the same folder as eclipse.exe file without asking me every time. I use eclipse on usb stick on several computers (different labs around campus + my own laptop), and drive letter always changes, so is there a way to make eclipse... more portable?
Upvotes: 2
Views: 577
Reputation: 12334
See this answer about starting Eclipse with a specific workspace
There is a command-line argument -data
you can give Eclipse for the location of the workspace. You could create a batch file called 'runeclipse.bat' and give it the current directory as the location of the workspace. I would create a subdirectory named 'workspace' though.
eclipse.exe -data .\workspace
A better idea would be to edit the eclipse.ini
, which is in the same directory as the executable, and put the -data argument there. Make sure the -data argument appears before any JVM arguments
For example, here is my eclipse.ini file
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx384m
I would add the -data argument like so, I've left empty lines to show what was added since there is no HTML or Markdown formatting in a code block, remember that the blank lines should not be in the actual eclipse.ini
file.
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-data
.\workspace
-vmargs
-Xms40m
-Xmx384m
Upvotes: 1