3

A few days I trying start my java application bundle on Mac. I have learned many articles, tutorials and discussions, but I don't understand if there exist any way to use java from bundle (Java is not installed on OS). I want put different versions of java inside my application bundle. How tell to application loader use jre from my app bundle?

alnasfire
  • 720
  • 6
  • 23

2 Answers2

1

Unfortunately you can't use linux jre, which copied after appbundler ant task performed, on MacOS. Here is the best article about deploying applications as bundles on MacOS.

slawter
  • 525
  • 4
  • 14
  • 1
    Your answer should not just contain a link to a tutorial, but also include the essentials from that source in the answer itself, so your answer does not become useless once the source has disappeared. – not2savvy Dec 04 '21 at 15:26
  • In the source you've linked to, I see a description how a Java jar is bundled as a Mac app, but it does not mention how to include the JRE within that app bundle (which is the question here). Please correct me if I'm wrong. – not2savvy Dec 04 '21 at 15:27
0

Oracle provides the best answer for this, see here for instructions: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html

Take a look at these other questions / answers for more info:

Using a bundled JRE on OSX

Bundling a private JRE on Mac OS X

Community
  • 1
  • 1
sorifiend
  • 5,927
  • 1
  • 28
  • 45
  • Did you try use ant task from Oracle documentation? I have tryed. And yes, I can copy jre from my $JAVA_HOME to Plugins folder, but application isn't starts by JavaAppLauncher which placed into MacOs folder. Can you give some other piece of advice from your own experience? – alnasfire Jun 02 '15 at 07:09