The Mac/Java/Ant AppBundler error, java.nio.file.NoSuchFileException: Info.plist

As I learned recently, the Mac/Java AppBundler tool is a little out of date these days, but you can still use it with Java 8 and MacOS 10.12 to build Mac/Java applications. One problem you can run into is getting this ugly Info.plist error:

java.nio.file.NoSuchFileException: /Users/al/Example/Info.plist
    at sun.nio.fs.UnixException.translateToIOException(
    at sun.nio.fs.UnixException.rethrowAsIOException(
    at sun.nio.fs.UnixException.rethrowAsIOException(
    at sun.nio.fs.UnixCopyFile.copy(
    at sun.nio.fs.UnixFileSystemProvider.copy(
    at java.nio.file.Files.copy(

That Ant error message goes on for a long time, but that gives you the general idea of the error. It complains that you don’t have an Info.plist file, but that’s not the problem at all. As it turns out, the problem happens when your JAVA_HOME variable is not set and exported.

To avoid this error — and fix the problem — just make sure JAVA_HOME is set properly. On my MacOS 10.12 system that uses Java 8, I set it in a shell script I use to call Ant like this:

export JAVA_HOME=`/usr/libexec/java_home -v 1.8`

Magically, as soon as I set and export JAVA_HOME like that, the Info.plist error goes away.

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.