Eclipse - Extract/package the required libraries into the same Runnable JAR

10,083

What you can do is choose "1. Extract required libraries into generated JAR" and save the build as an Ant script. Then after it finishes, edit the ant script and remove the libraries that you do not want to be extracted.

Share:
10,083
zw324
Author by

zw324

Ex Computer Science Student at NYU "The sleeper must awaken."

Updated on June 05, 2022

Comments

  • zw324
    zw324 almost 2 years

    When exporting a project as a Runnable JAR file using Eclipse, there are three choices:

    1. Extract required libraries into generated JAR
    2. Package required libraries into generated JAR
    3. Copy required libraries into a sub-folder next to the generated JAR
    

    However, it seems that only one of the three choices could be chosen from the Runnable JAR File Export window. I wonder if there are some ways that could mix up these methods, e.g., extracting some of the files while packaging the rest?

    Note: I need this since one of my JAR file contains a ton of references to other files so 1 cannot be an option, and I am afraid that 2 might be causing some problems for me.

    Thanks!