views:

135

answers:

2

Hi, I want to get the absolute path of the output folder. It may be a link to a folder outside the workspace. Thanks in advance

+1  A: 

If you want to get the system path of the output of a project programmatically (for an eclipse plugin), you could use IJavaProject:

IPath path = project.getOutputLocation();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getWorkspaceRoot();
IFolder folder = root.getFolder(path);
return folder.getLocation();

Also detailed here:

ResourcesPlugin.getWorkspace().getRoot().findMember(javaProject.getOutputLocation()).getLocation();
VonC
A: 

HI VonC, Thanks for the answer. It worked perfectly.