Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Java application to Mac OS X app

Is there a way to convert a Java application into a Mac OS X executable app?

I use NetBeans to develop in Java, and I'd like to "pack" the "dist" folder into an app (just for convenience)

like image 628
Barranka Avatar asked Jun 14 '12 16:06

Barranka


People also ask

Can I run Java apps on Mac?

Compiling and running a Java application on Mac OSX, or any major operating system, is very easy. Apple includes a fully-functional Java runtime and development environment out-of-the-box with OSX, so all you have to do is write a Java program and use the built-in tools to compile and run it.

How do I convert files to apps on Mac?

On your Mac, do one of the following: Drag the file onto the app icon in the Finder or the Dock. Select the file in the Finder, choose File > Open With, then choose an app. Control-click the file, choose Open With, then choose an app.


2 Answers

Use the Apple Java Extensions and its Guide

The Apple Java Extensions contains a very complete development guide with information on the deployment of Java applications on Mac OS X and the production of application bundles. It also introduces other aspects of the Apple Java Extensions, like the support for integration with the standard Mac OS X UI.

Other references:

  • JarBundler.
  • Make a Mac OS X App Bundle
  • Creating a osx app bundle in Java registered to a protocol url
like image 67
haylem Avatar answered Sep 22 '22 16:09

haylem


There is a library that let's you package your Java app
Packr: https://github.com/libgdx/packr

Packages your JAR, assets and a JVM for distribution on Windows (ZIP), Linux (ZIP) and Mac OS X (.app), adding a native executable file to make it appear like the app is a native app.

It can even minimize the JRE for you.

like image 32
Andrejs Avatar answered Sep 24 '22 16:09

Andrejs