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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:29:17+00:00 2026-05-31T11:29:17+00:00

I have built a Java/Swing Application and I have successfully deployed it using Ant,

  • 0

I have built a Java/Swing Application and I have successfully deployed it using Ant, to Windows (using launch4j) and for Mac (using jarbundler ant task).
However I want to use Ant to zip the .app along with other files, but since an .app is just a special folder, I am having some problems. Here is my Ant target:

    <property name="jarbundler.dir" location="lib/jarbundler" />
    <taskdef name="jarbundler" 
         classname="net.sourceforge.jarbundler.JarBundler"
         classpath="${jarbundler.dir}/jarbundler-2.2.0.jar"/>
    <target name="app">
        <jarbundler dir="release" name="MobilityCollector" mainclass="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader" jar="mc.jar" icon="img/icon.icns"/>
        <zip destfile="release/MobilityCollector_MacOSX.zip">
            <zipfileset dir="img" prefix="img/"/>
            <zipfileset dir="release/MobilityCollector.app" prefix="MobilityCollector.app"/>
        </zip>
    </target>

Here is the problem:

<zip destfile="release/MobilityCollector_MacOSX.zip">
     <zipfileset dir="img" prefix="img/"/>
     <zipfileset dir="release/MobilityCollector.app" prefix="MobilityCollector.app"/>
</zip>

The problem is that when I run the app (after zippig and unzipping it) it stays bouncing in the dock for ever, and if I click it, it shuts down immediately. I thought that maybe it is a permissions problem, but the permissions are the same as the original app (before zipping) .

Since a .app is a special folder, do I have to zip it in another way? I tryied zipping the way that FailedDev suggested, but it happens anyway.

  • 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-05-31T11:29:19+00:00Added an answer on May 31, 2026 at 11:29 am

    The problem is in the Ant Zip task when it bundles the .app/Contents/MacOS/JavaApplicationStub. The file permissions are set to 644. This file needs to be executable. You can fix this by specifying the following:

    <zip destfile="My-app.zip" level="9">
        <zipfileset filemode="755" dir="basedir" includes="My.app/**/*" />
    </zip>
    

    When you change the file mode to the non default of 755 you’ll set the JavaApplication stub to be executable, which should stop the bouncing icon in your task bar and actually launch your application.

    If this doesn’t fix your problem you might try launching the application with your console application running on the mac and see what the log says.

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

Sidebar

Related Questions

I have built a web application using Java EE platform that sells one of
I am developing a desktop app using Java and Swing Application Framework. I have
I have built a Java application that has some dependencies (~10). I would like
My Leopard system has dtrace built in. I also have Java 6 installed, using
I am trying to build an MVC application in Java Swing. I have a
In a Java Swing app (built in Netbeans 6.9), I have a JTable with
I have a simple java swing app, built in netbeans. There's a JList in
I have developed a Java Swing application, and it will be installed on multiple
I have a java applet built using awt. I draw some text on a
I have implemented a standalone java application which uses the swing framework for GUI.As

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.