I am tasked with deploying an old Eclipse RCP (Java 1.6) application with minimal or no changes to the code on macOS Mojave 10.14 64bit. The application hasn't been deployed in a long while, the last target was Mac OS X Snow Leopard 10.6.

The prime issue I have is that best results (full feature set) were obtained when changing the compile level of the app to Java 1.7, and circumventing this bug (where Mac complains no java is present when the JDK or JRE 1.7 or 1.8 was indeed correctly installed).

mac bug message about missing java when java isn't missing

Bug report:

Thanks to this hack:

which only functions if you have the JDK installed, not the JRE. However this being a corporate shipping, the client would never accept the pre-requisite being the JDK when it should be the JRE.

As you can see from my comment on the answer, I've tried a bastardised application of this solution on the JRE by modifying what I thought where the equivalent files and paths, but this did not work.

So, to sum up the situation

What I have

The app will run if I:

  1. Install the JDK

  2. Apply this: https://apple.stackexchange.com/a/211033/324385

What I would like

For the application to start when I've:

  1. Only installed JRE 1.7 or 1.8

  2. Applied X fix that you suggest to me

  • re JDK and JRE post 1.6. The JRE is just for web apps. Oracle messed up the naming. What is the exact reason you can't use the JDK? Also the more usual fix is to embed the Java VM in the app. ALso Java 7 is well past end of life from April 2015 so you are risking security issues. – user151019 Jul 4 at 9:56
  • unfortunately I am not authorized to modify the code to that extent. I cannot embed the VM into the deployed app. so I'm forced to provide it with a VM client-side. About the Java 7, I'm fine with using Java 8 (at least for the VM), the code refuses to migrate that far. but the security thing is a non-issue. This app is meant for the army, does not require a connection to the internet to function and runs on Macs that are isolated from the internet. – tatsu Jul 4 at 10:03
  • You need to speak to your manager and discuss the issues. The rules do need changing G and it might be there is some way to go that. – user151019 Jul 4 at 12:29
  • Note that adding the jre to the app is not much if a change possibly just copying files but could well be less change than installing a jre which requires root access. – user151019 Jul 4 at 12:30
  • you can really do that? I imagine it's not as easy as copying it in somewhere, there needs to be pointers to it in the launcher or something of the sort and the build process (which is in ANT) needs to keep these files instead of filtering them out. as for convincing my manager, I already tried that. – tatsu Jul 4 at 13:05

You must log in to answer this question.

Browse other questions tagged .