简体   繁体   中英

Making .app Files using Java on Mountain Lion Mac OSX

I read through the complete tutorial provided by Apple about Development in Java on Mac

But, Most of the stuff Mentioned in that tutorial is not present in my mac. The above mentioned article was last updated by Apple in Oct, 2010. So, I wish to know is it still possible to develop OSX applications using Java.

And will I be able to achieve the Native Look and Feel like other OSX apps ? If Yes, How and How do You Make the Application Bundle. I use netbeans.

To make a native Mac .app application bundle, you'll need to use the "Jar Bundler" tool included with XCode .

To use the native look and feel:

try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
    LOG.warn("Unable to set look & feel: " + e.getMessage(), e);
}

The old Mac "Jar Bundler" app is no longer available. It is not included with Xcode and is not available from the Mac Developer website.

If you want to target Java 7, then the new recommended way to create an application bundle is to use Oracle's appbundler.jar . See here for a step-by-step guide.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM