
Just for completeness, this is how ist looks like:

The gets built up at runtime by the native JavaAppLauncher as it reads in the *.jars from MyJavaMacOSXApp.app/Contents/Java directory. Note: The order of elements in the bundle task isn't preserved at runtime of your bundled app. Public class MyJavaMacOSXApp extends JPanel Source of MyJavaMacOSXApp.java package com.example Like you can see in the following screen shot of such a deployed MyJavaMacOSXApp.app: If you want to use the default Oracle Java 7 Package (JRE) installed on the application bundle target Mac underĮlement fromt the bundle task. Wiring default Oracle Java 7 Package (JRE) So the application package is totally self contained and does not need an Oracle Java 7 Package (JRE) installed on the target system at all. The Ant target above copies the Oracle Java 7 Package (JRE) from your You can find here some additional AppBundlerTask options, as this example shows only how how it works in its simplest form.Īfter you run the bundle target with ant bundle you will find MyJavaMacOSXApp.app in the /dist directory. Note: You need to replace MyJavaMacOSXApp with your application data.

Your Mac OS X application bundle has been created with an app bundler which is not compatible with Oracle's Java 7 package. I guess my current JDK is pointing to something wrong. System/Library/Frameworks/amework/Commands/java -version java version "1.6.0_37"

Ls /Library/Java/JavaVirtualMachines jdk1.7.0_12.jdk Library/Internet\ Plug-Ins/ugin/Contents/Home/bin/java -version java version "1.7.0_12-ea"

usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk1.7.0_12.jdk/Contents/HomeĮcho $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_12.jdk/Contents/Home/ Library/Java/JavaVirtualMachines/jdk1.7.0_12.jdk/Contents/Home My Java system environment looks like this: Thus there is nothing wrong with the application. When I run it with Eclipse by selecting JRE 7, it runs properly. I am using the Mac only for testing purposes. I tried most of the things mentioned in different sites, but I was unable to fix this issue. The default system output of java -version is showing 7. Instead using Java 7 from Oracle, it's using Java 6 from Apple. I am testing my current application with Mac OS X which has Java 7 from Oracle installed. Application is using Java 6 from Apple instead of Java 7 from Oracle on Mac OS X?
