简体   繁体   中英

How to create a runnable jar with the eclipse jdt API?

When we are in Eclipse IDE and right-click on a java project, we have the option to export that project as a runnable Jar file .

It exists, thus, some code that uses the jdt API to accomplish this task.

I know the package used should be org.eclipse.jdt.ui.jarpackager but I couldn't find how.

Does anybody know something more?

To be clear, I'd like to start in my program (eclipse plug-in) with a JProject object and be able to save a jar file (and later load the same) in the workspace.

EDIT: It's a programming problem. I don't know how to use the classes of org.eclipse.jdt.ui.jarpackager to transform a JProject in a runnable Jar file .

Solved by myself.

I simply extended the fatJarExportWizard and used it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM