Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8216211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:03:07+00:00 2026-06-07T12:03:07+00:00

For some time now, our Java application has came pre bundled with a JRE

  • 0

For some time now, our Java application has came pre bundled with a JRE on Windows. We have a little launcher app written in C that make the application use our pre bundled JRE. Now with Apple’s crusade to slowly kill Java we have decided that it would be prudent to something similar on OSX. What would be the best way to use a pre bundled JRE on OSX?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:03:08+00:00Added an answer on June 7, 2026 at 12:03 pm

    Even if I find it a bad idea (see below) you could just bundle a JVM like OpenJDK and then start your application with a small script calling your java executable.

    Notice: I have no idea if redistributing a JVM is allowed (legal), you should check the agreement before downloading

    • The first problem you will have is that at the moment there is just Apple’s version or Oracle Java 7u6 Mac OS X Port Developer Preview Release (which is just a preview). (e.g., http://jdk7.java.net/macportpreview/). This will change in the future when Apple will stop supplying its own version. So at the moment you are stuck with a preview running on Lion only. But I will show you an example.

    • Download the installer, mount the disk image, right click on the plugin, choose “Show package content” extract the Home folder, it contains the JRE

    • You can then check with

      $ ./Home/bin/java
      java version "1.7.0_06-ea"
      Java(TM) SE Runtime Environment (build 1.7.0_06-ea-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 23.2-b08, mixed mode)
      

      I would then rename Home in something like jre

    • If you package this folder with your application you will just have to include a small script with

      #!/bin/sh
      ./jre/bin/java -classpath myniceapplication.jar
      
    • To be able to build an application you will need an applicationname.app/Contents/MacOS folder containing you script (which should be named applicationname).

    • Now it seems that you need the use absolute paths in these scripts

      /Path/applicationname.app/Contents/MacOS/jre/bin/java -classpath myniceapplication.jar
      

      I suppose that there is a better solution to build a Mac OS X application bundle but I’m not an expert. This example was just to show that it can work.

    Summarizing:

    • Check if it is allowed to redistribute the JRE (and check which are the conditions)

    • I would not do it since you will have to keep it updated and update your application every time there is JRE security update

    • As a user I would trust more Oracle than a random developer (nothing personal 🙂 to get a JRE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have spent some time now to solve a problem for which i have
I have looked at this page for some time now. Amazing, really. But I
I have been learning python for some time now. While starting this learning python
I have been working on this for some time now and just cant quite
I have been working in C++ for some time now, but I am unsure
Our application is sometimes timing out, we have a Java client connecting to a
I've had Windows Authentication setup on an area of our website for some time
We have been using weborb for .net on an existing application for some time
I've been a web developer for some time now, and have recently started learning
I have for some time now being building my own calendar because the standard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.