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 7758631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:24:34+00:00 2026-06-01T13:24:34+00:00

My jar will not run after I compiled it. I use this ant build

  • 0

My jar will not run after I compiled it. I use this ant build script

<project name="HelloWorld" basedir="." default="jar">

<property name="src.dir"     value="src"/>

<property name="build.dir"   value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir"     value="${build.dir}/jar"/>
<property name="libsSrc" value="libs"/>

<property name="main-class"  value="nat.ise.ApplicationStarter"/>

<path id="classpath">
    <fileset dir="${libsSrc}" includes="*.jar"/>
</path>

<pathconvert property="mf.classpath" pathsep=" ">
    <path refid="classpath"/>
    <mapper>
        <chainedmapper>
            <flattenmapper/>
            <globmapper from="*.jar" to="lib/*.jar"/>
        </chainedmapper>
    </mapper>
</pathconvert>

<target name="clean">
    <delete dir="${build.dir}"/>
</target>

<target name="compile">
    <mkdir dir="${classes.dir}"/>
    <javac srcdir="."  classpathref="classpath"  destdir="${classes.dir}"/>
</target>

<target name="jar" depends="compile">
    <mkdir dir="${jar.dir}"/>
    <jar destfile="${jar.dir}/${ant.project.name}.jar">
        <zipgroupfileset dir="${libsSrc}" includes="*.jar"/>
        <fileset dir="${classes.dir}" includes="**/*.class"/>
        <manifest>
            <attribute name="Main-Class" value="${main-class}"/>
            <attribute name="Class-Path" value="${mf.classpath}"/>
        </manifest>
    </jar>
</target>

</project>

The manifest is correct and I am managing to get some of the libraries included but when running from the cmd prompt i get the error

java.io.FileNotFoundException

The file it is referring to a JOGL library gluegen-rt-natives-windowsamd64.jar

Initially I was running the project from eclipse using the 32bit libraries, I have now included the 64bit libraries in the folder libs but it is still telling me that it cannot find them.

In fact I now can see, when I open the jar, two copies of all the .dll files (I can only assume that this is one from the 32bit and one from the 64bit versions of JOGL)

Is there not a way to make the program run using just the 32bit libraries? I want to reduce the ammount of distributions I have to make.

  • 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-01T13:24:36+00:00Added an answer on June 1, 2026 at 1:24 pm

    I don’t think I deserved the downvotes but hey.

    Well anyway the problem was that I was referencing .jars within .jars, I didn’t think that this would be a problem but it was. The solution was to put the .jars (libraries) alongside my compiled application .jar and update the manifest accordingly. it is also possible to use .jars within .jars but you will need the use of another set of classes to let you do this. Eclipse has this and if you build excecutable .jar from within eclipse you can have .jars within .jars.

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

Sidebar

Related Questions

I am trying to run a jar using this command in my shell script
I have a jar file I produced from compiled class files using an ant
Project is to create exe file. If we run exe file it will open
I have a compiled Java Application (.jar file extension, no source code) which will
I have a jar on the classpath which contains a hibernate.properties. This causes problems
I'm trying to run the following rocket launching application: object HelloWorld { def main(args:
I am trying to run this example http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/PoolingDataSourceExample.java?view=markup but somehow I am not able
The problem: I can't get my java app to run after compiling. My guess
I am trying to use Lombok with Android however whenever I try to run
check the following program: Run it in sun java hostspot jvm, everything will be

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.