Unable to find a JRE installation: macOS, Eclipse Neon.3, java 8_152

Been using Eclipse on a windows VM for a while and just trying to go native mac.

I see the following error in the Eclipse console when I try to do a Connect IQ run, or build. Eclipse starts up fine, though.

"Unable to find a JRE installation. Make sure you have a default JRE specified in the Java preferences.
Aborting launch due to failed build."


- I've installed java 1.8.0_152 on the mac and this appears to be setup correctly. "java -version" returns the correct version. I updated the eclipse.ini file in the "eclipse.app" package to include the following (as per the output from "/usr/libexec/java_home --verbose", which gave me: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home):

eclipse.ini:
...
openFile
--launcher.appendVmargs
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/java

-vmargs
...

I can see in Eclipse | Preferences | Oomph | Java Virtual Machines the settings as per the attached image.

- I've installed Eclipse Neon.3 (4.6.3) on the Mac (High Sierra unfortunately).

- I have installed Connect IQ SDK (2.3.5) and linked this into Eclipse. I've also set the Connect IQ perspective. this seems to be ok and Eclipse starts up. BUT, as per the error above, I cannot Build or Run.

Is there some other configuration setting I need to update, perhaps on the ConnectIQ side?

TIA
Rob.
community.garmin.com/.../1278630.png
  • BTW, the same issue exists with Eclipse Oxygen (4.7.1a)
  • Try some older version - I have latest MAC OS, Eclipse 4.8 Photon and it works with Java 1.8.0_31community.garmin.com/.../1279568.png
  • Thankyou!

    I had tried MARS, NEON and OXYGEN, but none had worked.
    I installed Photon (4.8.0M2) and JDK 1.8.0_31 and that worked.

    Photon was also the only eclipse version that gave me the "Preferences | Java | Installed JREs" setting that allowed me to select a different JRE. I get the same original problem I logged using JDK 1.8.0_152. Photon only worked when I switched to JDK 1.8.0_31.

    I tried to use Oxygen with JDK 1.8.0_31 - I tried setting the -vm argument in the eclipse.ini file to the 1.8.0_31 JDK and running eclipse, but I get the original issue that I logged.

    I'm happy to use Photon and JDK8_31.

    Cheers,
    Rob.
  • Former Member
    Former Member over 5 years ago

    This problem is related to the type of Eclipse install that you select. The new installer can make it confusing and the Connect IQ docs are now incorrect. It is a requirement that you install the Eclipse for Java Developers version. This will correctly identify your JRE and give you the option to select another one if required. Unfortunately, the Connect IQ docs seem to suggest you can install any version, which used to be the case, but is no longer correct. Installing the the C/C++ version seems sensible, because the language we are developing is called Monkey C, but in fact it has nothing to do with C and its compiler is written in Java. Hope this helps someone, as it took me a while to figure this out.

  • Not sure if this is related, i had a similar error, it turned out to be related to 32 vs 64 bit versions of JRE and it needing to match the eclipse # of bits. In the end i have both 32 and 64 bit (x86 and x86_64) installed to avoid issue. I think the error message we similar to what is described here. Not a very informative error message in this case.

  • Former Member
    Former Member over 4 years ago in reply to Former Member

    Thank you! I initially downloaded the C/C++ version (for the very reason you had mentioned) and got an error message. I switched to the Java Developers version and it works!