In Eclipse RCP (in IDE too), the default location of workspace dir is USER_HOME\workspace. Use the following code to use a different default.

[java]
Location location = Platform.getInstanceLocation();
if (!location.isSet()) {
File f = new File(“/tmp/my_new_location”);
boolean locationSet = location.setURL(f.toURL(), true);
if (!locationSet) {
//Throw a nice error.
}
}
[/java]

Ofcourse this can always be over-ridden by the -data option.

Advertisements