Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jar Bundler doesn't work

 
Sabine Mir
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!

Thanks!
 
Sabine Mir
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much Sabine ! I was stuck for ages on this until I found your post.

Michael
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic