How to get path to project output classes in eclipse plugin

I want to get the absolute path to the output folder. This may be a link to a folder outside the workspace.

+3
source share
1 answer

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

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

Also more details here :

ResourcesPlugin.getWorkspace().getRoot().findMember(javaProject.getOutputLocation()).getLocation();
+3
source

Source: https://habr.com/ru/post/1711069/


All Articles