Reputation: 472
Whenever I move the Eclipse folder to another location, it would completely reset unless I switch the workspace manually. It seems to use an absolute path, but I want a relative one to actually make it fully portable.
Any way of doing this? Where do I find the workspace path I've set?
As a side note, referenced libraries inside projects must use relative paths to prevent a re-configuration.
Upvotes: 1
Views: 3034
Reputation: 1
On your eclipse.ini
file, just above the line (it must be above this line)
-vmargs
Paste these lines exactly as follows (you may replace DesiredWorkspaceName
)
-data
DesiredWorkspaceName
Do not create a directory beforehand. Eclipse will do this automatically. For things to go smoothly for the most part, you really should let Eclipse create the directory. It is imperative the -data
is in a line all on its own.
Tested with Eclipse: product verison 4.17.0, 2020-09 R.
Upvotes: 0
Reputation: 738
if you are working on Windows create a bat file within this command subst G: ,G is a local disque name it's just an example the only condition it to choose a disque local name that not already exist. put this bat file next to your workspace in the same level, then execute this but file ,a disque local icon with the name G or the one you had chosen will appear in your work station,then launch eclipse and chose the this path G:\workspace.the positive about this method is not only eclipse became portable but everything exist in same level of the bat file.
Upvotes: 0
Reputation: 8432
If your workspace
is relative to your eclipse
folder then try adding this to the config.ini
using relative path with platform schema
to workaround the fact that you cannot use an absolute path according to this.
-data platform:/base/workspace
The file is located in the root eclipse folder.
Upvotes: 2