1

I've created an app in java and I would like to be able to put it in the dock on Mac OS X. It's not possible to do it with the .jar file, so I've wrapped it in an .app folder. Now it won't even start.

The app creates files in the same directory as the MyApplication.jar file and I thought this might be the problem. Can you write files in the MyApplication.app directory? If not, what might be causing this problem?

Igor
  • 1,532
  • 4
  • 23
  • 44
  • 1
    You may want to take a look at [JarBundler](http://informagen.com/JarBundler/) which builds `.app`. There might be better solutions, I am not a MacOS expert, but this is how we do it. – Guillaume Polet Jun 11 '13 at 21:40
  • AskDifferently may be able to help out with this as well. Those guys are great with Apple software oriented questions. – Kyle Jun 11 '13 at 21:41
  • As far as I'm aware, if the Java program has a Window (may need a Frame) it should so up on the dock. Getting the icon you want is another question ;) – MadProgrammer Jun 11 '13 at 22:30

2 Answers2

2

You may be missing the JavaApplicationStub or some critical element in your Info.plist. If these terms are unfamiliar, several related developer links are cited here. Technically, you can write to $JAVAROOT if you have permission, but the preferred approach is to use a directory available to the user, as discussed in the guidelines cited here.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • It's probably not missing anything in the Info.plist because I've created the bundle using Advanced Installer. I'll try changing the database directory to "user.home" and see if it that helps. – Igor Jun 16 '13 at 17:56
  • nope, nothing works I have no idea what could be wrong cuz no error messages show up. – Igor Jun 17 '13 at 14:56
  • You might compare what you're doing with this working [example](http://robotchase.sourceforge.net/). – trashgod Jun 17 '13 at 17:02
1

I finally did it using Eclipse. There's a export as a Mac bundle option in the file menu in the Mac OS X version of Eclipse :)

Igor
  • 1,532
  • 4
  • 23
  • 44