Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8001423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:05:27+00:00 2026-06-04T16:05:27+00:00

I have runnable jar with couple of 3rd party jars inside it. Do I

  • 0

I have runnable jar with couple of 3rd party jars inside it. Do I have to specify those libraries with Proguard’s -libraryjar option even if they are already packed in the main jar file?

At the moment I’m these errors:

Warning: there were 171 unresolved references to classes or interfaces.
Warning: there were 394 instances of library classes depending on program classes.
Warning: there were 1 unresolved references to program class members.

If I specify the jars with -libraryjar option Proguard warns alot about duplicate classes.

My ant build:

<target name="jar" depends="compile">
    <delete file="${destfile}" />
    <jar destfile="${destfile}" filesetmanifest="mergewithoutmain" duplicate="preserve">
        <manifest>
            <attribute name="Main-Class" value="main.Main"/>
            <attribute name="Class-Path" value="${classpath}"/>
        </manifest>
    <fileset dir="${target}" includes="**/*.class" />
        <zipfileset excludes="META-INF/*.SF" src="lib1.jar" />
        <zipfileset excludes="META-INF/*.SF" src="lib2.jar" />
        <zipfileset excludes="META-INF/*.SF" src="lib3.jar" />
    </jar>
</target>

<target name="dist" depends="jar">
    <taskdef resource="proguard/ant/task.properties" classpath="${proguard}" />
    <proguard>
        -injars      ${destfile}
        -outjars     ${destfileobfuscated}
        -libraryjars C:/Java/jdk1.6.0_25/jre/lib/rt.jar;
                     C:/Java/jdk1.6.0_25/jre/lib/jsse.jar;
                     C:/Java/jdk1.6.0_25/jre/lib/jce.jar;
                     lib1.jar;
                     lib2.jar;
                     lib3.jar

        -optimizationpasses 5
        -overloadaggressively
        -repackageclasses ''
        -allowaccessmodification
        -dontskipnonpubliclibraryclassmembers

        -keepclasseswithmembers public class * {
            public static void main(java.lang.String[]);
        }
    </proguard>
    <move file="${destfileobfuscated}" tofile="${destfile}" />
</target>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:05:28+00:00Added an answer on June 4, 2026 at 4:05 pm

    In proguard you must assign your 3rd party library jars with the following command:

    -libraryjars  jar1.jar, jar2.jar, jar3.jar...
    

    If you don’t include these jars as above, the code related to them will not be obfuscated/optimized/shrinked because they will be unresolved with respect to proguard.

    It’s OK if it warns, because it will find a lot of classes with the same name, it’s normal, but this wont have any negative impacts on the outcome.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a runnable jar with two jars in the Class-Path entry of its
I have a Runnable class that I'm writing. Inside of it, I have two
I have an ant script that creates runnable jar and I want it to
I have a single .jar file that I create by using the runnable .jar
I have a Runnable jar file, is there anyway to embed it into html
I have a runnable jar file, that I start with java -jar myFile.jar on
I need help with this mistake. I have created a Runnable jar with two
I have just developed and exported a Runnable JAR using Eclipse on my 64
I have Java application and I export it to runnable .jar application. Can I
I have exported a project to a runnable JAR in eclipse. There are a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.