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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:45:49+00:00 2026-06-01T19:45:49+00:00

I am building dmg file by using ant tool, but I am getting error

  • 0

I am building dmg file by using ant tool, but I am getting error while build.

Extract of build.xml:

            ...
            <copy todir="${mac.build.dir}/.background">
                    <fileset file="${basedir}/build/installer/images/mac/dmgBackground.png"/>
            </copy>

            <symlink link="${mac.build.dir}/Applications" overwrite="true" resource="/Applications" />
            <echo message="Create tmp.dmg"/>
            <exec executable="hdiutil" failonerror="true">
                    <arg line="create -srcfolder '${mac.build.dir}' -volname '${mac.volname}' -fs HFS+ -fsargs '-c c=64,a=16,e=16' -format UDRW '${target}/tmp.dmg'"/>
            </exec>
            ....

Error:

**BUILD FAILED
D:\DevProjects\spark\build\build.xml:761: Could not launch ln: java.io.IOException: Cannot run program "ln": CreateProcess error=2, The system cannot find the file specified**

I used script to invoke dmg file creation is ant installer.mac

Am I invoking correct target or wrong one?

  • 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-01T19:45:51+00:00Added an answer on June 1, 2026 at 7:45 pm

    Ant’s symlink task doesn’t work on Windows variants.

    See SO: Ant symlink task on windows (NTFS)

    From the Ant documentation:

    Manages symbolic links on Unix based platforms. Can be used to make an individual link, delete a link, create multiple links from properties files, or create properties files describing links in the specified directories. Existing links are not overwritten by default.

    … and …

    LIMITATIONS: Because Java has no direct support for handling symlinks this task divines them by comparing canonical and absolute paths. On non-unix systems this may cause false positives. Furthermore, any operating system on which the command ln -s is not a valid command on the command line will not be able to use action=”single” or action=”recreate”. Action=”record” and action=delete should still work. Finally, the lack of support for symlinks in Java means that all links are recorded as links to the canonical resource name. Therefore the link: link –> subdir/dir/../foo.bar will be recorded as link=subdir/foo.bar and restored as link –> subdir/foo.bar


    As to how to fix it, I’m now out of my depth as I’ve never made a DMG before. However, the symlink is a link to the Applications folder, and may simply be there so that the user has a handy link to drag the application to in order to copy into Applications. As such, that link may not be strictly necessary. If anyone can shine some light on this, please do.

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

Sidebar

Related Questions

Building our Android app from Ant fails with this error: [apply] [apply] UNEXPECTED TOP-LEVEL
Building a multi-language application in Java. Getting an error when inserting String value from
building a site using PHP and MySQL that needs to store a lot of
Building a sample ASP.NET MVC app. Using the Membership API for authentication. For whatever
building libraries with waf is nice and I like the lib<targetname> naming scheme. But
Building an app using android.support.v4.app , targeting API level 8. Everything's working as planned
Building a website using a PHP based Ecommerce product Magento. The problem I have
Building on another SO question , how can one check whether two well-formed XML
building on my last question jQuery getting values from multiple selects together I have
Building a site on CargoCollective, but it appears they use jQuery 1.4.2 which seems

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.