Wednesday, January 8, 2014

Getting Eclipse Workspace file system path

ResourcePlugin is a starting point for workspace initialization. This will hold the all required information about the workspace.

IWorkspace workspace = ResourcesPlugin.getWorkspace();

//Local file system
IPath file = workspace.getRoot().getLocation();

Output path:
D:\Work\KKWorkspaces\runtime-New_configuration


//Remote location 
URI locationURI = workspace.getRoot().getLocationURI();

OutputPath:
file:/D:/Work/KKWorkspaces/runtime-New_configuration

1 comment:

  1. Greetings, nice day. In the case of maven how to add dependency?

    ReplyDelete