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

  • SEARCH
  • Home
  • 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 9150225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:35:04+00:00 2026-06-17T11:35:04+00:00

I am using Java 1.6, Eclipse, and Ant. The following is my target for

  • 0

I am using Java 1.6, Eclipse, and Ant.

The following is my target for creating a jar file and running it:

    <!-- Settings -->
    <property file="build.properties" />
    <path id="classpath">
        <fileset dir="${lib.dir}" includes="**/*.jar" />
    </path>

    <!-- Compile -->
    <target name="compile">
        <mkdir dir="${classes.dir}" />
        <javac srcdir="${src.dir}" destdir="${classes.dir}" includeantruntime="false">
            <classpath refid="classpath" />
        </javac>
    </target>

    <!-- Package .jar -->
    <target name="jar">
        <mkdir dir="${jar.dir}" />
        <jar destfile="${jar.dir}/App.jar" basedir="${classes.dir}">
            <manifest>
                <attribute name="Main-Class" value="main.App" />
            </manifest>
        </jar>
    </target>

    <!-- Run .jar -->
    <target name="run">
        <java jar="${jar.dir}/App.jar" fork="true" />
    </target>

The problem is that when I run this jar (via Ant or command-line) I receive the error:

Exception in thread "main" java.lang.NoClassDefFoundError: net/xeoh/plugins/base/impl/PluginManagerFactory
     [java]     at plugins.PluginLoader.<clinit>(Unknown Source)

Some things that might be useful to know:

  • When I print my classpath, it shows that all the requisite JARs are
    there; it also shows up the Eclipse’s GUI version of the class path.

  • I have tried cleaning the project (both via Eclipse and Ant) to no avail.

  • The library .jar that seems to be missing is not a .jar in a .jar (which seems to be a common problem).

  • This is the only error. Other classes seem to find the library alright…

  • 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-17T11:35:05+00:00Added an answer on June 17, 2026 at 11:35 am

    You’ve set the compile classpath but the App.jar does not include your libs (only the classes you compiled) or a manifest classpath.

    You’ll need to do the following:

    <target name="jar">
        <mkdir dir="${jar.dir}" />
        <manifestclasspath property="manifest.classpath"
                           jarfile="${jar.dir}/App.jar">
          <classpath refid="classpath" />
        </manifestclasspath>
        <jar destfile="${jar.dir}/App.jar" basedir="${classes.dir}">
            <manifest>
                <attribute name="Main-Class" value="main.App" />
                <attribute name="Class-Path" value="${manifest.classpath}" />.
            </manifest>
        </jar>
    </target>
    

    See also ant manifestclasspath task

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

Sidebar

Related Questions

I'm using ANT to build the WAR file for my Java web app. However,
I am having a java project with a ant build file, using this ant
As an experiment we want to build our products using the Eclipse java compiler
I created a runnable jar using ant but it is not running. when I
I have some java source that gets build on a Linux machine using ant.
We currently build our Android (Java) projects using the built-in Eclipse build tools. Then
I'm using java with eclipse on windows 7, and I'm trying to build a
I have a running Java GWT application, that I can compile using Eclipse. Now
I have an ant script that does a headless build using the following ant
I am trying to create my first GUI application using (Java + Eclipse +

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.