Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Create MAC application using Java on Windows platform..



Laxmilal Menaria wrote:

I have created a java swing application and its working fine on
windows and Linux. Now I want to create this for MAC. I got we can
create .app for MAC, but I don't know too much about MAC, so want to
create .app on windows, Is there are any ant task for that or any
steps for creating .appcication.. please suggest me asap...

It can certainly be done -- a Mac .app bundle is just a directory with the extension ".app" and specific files in specific places. The Ant task mentioned earlier can help get the right things in the right places, but you could also do the same thing with a Makefile, or manually. Once you have one created, only two files will change very often -- the JAR file (or files if your app has more than one), and the Info.plist (where JVM arguments like -Xmx256m get put, traditionally it is in XML but a binary format is also allowed). For simple apps I build an app bundle early in the development cycle, and just manually update the JAR files as things progress. You could create an app bundle on a Mac, move it to your dev system, update the JAR file(s) there, and copy the updated bundle back for testing.


As mentioned by another poster, the most important part of a Java app bundle is the launcher stub (a native Mac executable that starts the JVM and loads your main class), this can only be obtained from a Mac (from the JavaVM framework, IIRC). You should use the most recent stub available, which means you need to have a Mac to get it off of. If I did not have a Mac, I would not ship an app bundle, but stick with a double-clickable JAR file. The reason is testing -- building an app bundle on another platform and distributing it to customers without testing it on a Mac is not a good idea. A Mac mini is plenty of Mac for testing most Java apps (and cheap enough even for a hobby developer to afford), and good enough for many development tasks too.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden


This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.