File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mac OS and the fly likes Jar Bundler doesn't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Jar Bundler doesn Watch "Jar Bundler doesn New topic

Jar Bundler doesn't work

Sabine Mir

Joined: May 28, 2009
Posts: 2
I'm really stuck. I'm trying to wrap my application for OS X using Jar Bundler, but no matter what I do, when I try to create the application I get the infuriatingly unhelpful error message, "Application failed to build." No further information, no errors in the console, nothing.

There is exactly one google search result for this error message, and the advice given on that page didn't help.

I have one jar file with a main class that I enter into the Main Class field and five other jars used by the program (in the same directory as the main jar) that I put into the Additional Files and Resources Section. They are then automatically added to the Additions to Classpath section with $JAVAROOT/ at the beginning. I've tried reconfiguring all the other options every which way; no matter what I do, "Application failed to build." Oh, and my main jar file runs perfectly from the terminal and when double clicked. I've also successfully wrapped it as a Windows executable using Launch4j.

Can anyone help me? I would be so grateful!

Sabine Mir

Joined: May 28, 2009
Posts: 2
Well, with a little lucky stumbling in my research I've determined and solved the problem, so in case anyone's curious:

For reasons that are an utter mystery to me-- since I've never even known of the existence of this directory, let alone modified it-- my System/Library/Frameworks/JavaVM.framework/Versions contained no symbolic link called Current. This, I learned, is where Jar Bundler finds the java application stub when it's making an application, so that was the problem.

The only place in there I could find the java application stub was in a folder called "A", so I just created my own Current and made it point to "A" using this command.

$ sudo ln -s A Current

Then I tried it again, and it worked! Yee-haw!
Michael Bedward

Joined: Dec 10, 2009
Posts: 3
Thanks so much Sabine ! I was stuck for ages on this until I found your post.

I agree. Here's the link:
subject: Jar Bundler doesn't work
It's not a secret anymore!