Why is Jar Bundler gone in Mac OS X Mountain Lion 10.8.2

假装没事ソ 提交于 2019-11-28 05:06:17

So looks like I have to answer the question my self. So don't punch me for that.

After intensive research and downloading all Java Developer Packages from Apple since 2012 til now (March 2013) it turns out its has nothing to do wit Xcode.

Jar Bundler came in the past with Apples own Java Developer Packages. After trying them all out, one after another and inspecting them with Pacifist I found the following out:

starting with

directory gets removed by the installation of this package, but there are no new /usr/share/java/Tools/*.apps re-installed anymore by the same package.

Even re-installation of 2012-005 after /usr/share/java/Tools directory got removed by 2012-006 doesn't bring you back the Jar Bundler.app.

So the only way to get Jar Bundler.app back after you lost it while some Apple Java Developer Package update exercises you need to do the following :

  1. Get Pacifist or some other tool of your choice who can deal wit *.pkg files.
  2. Open Java for OS X 2012-005 Developer Package with it.
  3. Ctrl-Click JavaDeveloper.pkg\JavaTools.pkg\Jar Bundler.app

  4. Choose Install to Default location
  5. open Terminal.app
  6. open /usr/share/java/Tools/Jar\ Bundler.app/

Thats it and don't forget to back it up.

To understand which Apple release number belongs to which JDK/JRE version numbers, see below:

  • Java for OS X 2012-005 Developer Package from 2012-09-06

    $ java -version
    java version "1.6.0_35"
    Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M4203)
    Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
    
  • Java for OS X 2012-006 Developer Package from 2012-10-16

    $ java -version
    java version "1.6.0_37"
    Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
    Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
    
  • Java for OS X 2013-001 Developer Package from 2013-02-19

    $ java -version
    java version "1.6.0_41"
    Java(TM) SE Runtime Environment (build 1.6.0_41-b02-445-11M4107)
    Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-445, mixed mode)
    
  • Java for OS X 2013-002 Developer Package from 2013-03-04

    $ java -version
    java version "1.6.0_43"
    Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
    Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
    

The official replacement for JarBundler is the javapackager tool.

As an example of its use, a simple, well explained, step by step tutorial for making OSX apps from a java source is here: http://centerkey.com/mac/java/ .

In short, if you want Jar Bundler, install "OS X 2012-005 Developer Package". More recent packages have it removed.

jornane

Jar Bundler is retired now and will not work for projects requiring Java 7 and up. Check this other StackOverflow question «Bundle a Java 7 .jar for Mac» for more details.

The solutions mentioned in this question will in all likelihood continue to function, but only for projects up to Java 6.

Brendan Dooley

As a developer with Pyxis Software, I would like to add that we have developed a small inexpensive application called Pyxis Bundler that makes it really easy to create Mac application bundles.

We designed it as a replacement for the Jar Bundler application that was previously shipped with Xcode.

To use Pyxis Jar Bundler you will need a minimum of three items:

  1. Runnable jar file (myApplicatin.jar)
  2. An icon file (myIcon.icns)
  3. A Splash file (mySplashImage.png)

Then simply enter your application name, version number, ram requirements, your package name, main class name, and a few other items. Next click Create and that's it, your application is bundled into a standard Mac Bundle.

Note that any Application created is saved to a preferences file. What this means is that bundling updates is simply a matter of choosing your application name from a drop-down list and incrementing the version number and then clicking the Create button.

More information is available here.

On El Capitan and Java 9, java packager is installed here:

"/Library/Java/JavaVirtualMachines/jdk-9.x.x.jdk/Contents/Home/bin/javapackager"

Make an alias: alias javapackager="/Library/Java/JavaVirtualMachines/jdk-9.x.x.jdk/Contents/Home/bin/javapackager"

Eshria

Just do this:

  1. right click on install OS X Mountain Lion.app
  2. show package contents
  3. go inside Contents/SharedSupport/ and mount InstallESD.dmg

Now you have to go inside this folder: Packages. You'll find JavaEssential.pkg and JavaTools. Jar bundler is in JavaTools.pkg.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!