Java Eclipse: Programmatically import plug-ins and fragments

Viewed 433

I need to programmatically import a .jar in my workspace as I do when I use the menu:
Import -> Plug-in development -> Plug-ins and Fragments.

Here I find the code for import a java project:

IProjectDescription description = ResourcesPlugin.getWorkspace().loadProjectDescription( new Path("PROJECT_PATH/.project"));

IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(description.getName());

project.create(description, null);
project.open(null);

But I don't have .project on .jar file. Can you help me?

Thanks

1 Answers
Related