Install using oracle java 11

  • Platform information:
    • Hardware: raspberry pi 4, 4 gigs ram
    • OS: aarch64 (beta)
    • oracle java 11
    • openHAB version: 3
  • How can I make it use oracle’s java 11? I’ve extracted oracle java 11 in /usr/local/java/ which created the directory jdk-11.0.10. In it is the bin directory and other stuff. Do I need to symlink their bin/java to /usr/local/bin? I’ve set JAVA_HOME. What do I put in the openhabian.conf file for java_opt? I don’t want 2 javas on my system (openhabian-config unattended installed zulu). In openhabian.conf I set hwarch to aarch64 but it installed zulu 32bits.
  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue
    • Services configuration related to the issue
  • If logs where generated please post these here using code fences:

Zulu openJDK 11 is recommended for the Pi because it is the only one supporting hardware float on the ARM platform.

Ok, thanks. But what about it installed the 32 bit one instead of 64 bit? I’m running the 64 bit beta for raspberry pi.

64 bit beta of what? openHAB will work with Oracle Java 11 but it will have less performance because floating point calculations would not use the hardware features in that CPU.

Sorry, the raspberry pi os is their 64 bit beta.

1 Like

Zulu is recommended.

Why bother with installing another Java yourself when you’re already on openHABian?
It’s all prepared.
Stick with Zulu or use the openhabian-config menu to install Adopt OpenJDK as an alternative but don’t mess with Oracle, it’s known to not work well.

PS: did you install Raspi OS yourself and openhabian unattended on top ? :roll_eyes: there’s an image for that which will do that for you. Yes even a 64 bit one (although that does not make sense to use as it only has disadvantages).

I wasn’t on OpenHabian. I installed raspberry pi 64 bit os on a blank disk. Then I installed Oracle Java 11 64 bit (no 32 bit provided, which is why I installed the 64 bit raspberry os). Then I installed openhabian and it installed zulu 11 32 bit. uname says it’s a 64 bit system so it seems to me that zulu 11 64 bit should have been installed, not 32 bit.

Ok, I can live with that. If I uninstall zulu11 32 bits and install zulu11 64 bits will openhabian-config use the 64 bit zulu11?

That was a totally wrong order and mish-mash, you better stick with the install instructions next time.
Start over with the openHABian image, it’ll install a Java to match the OS.
Use the 64 bit image if you insist but as I said that gets you nothing but disadvantages.

1 Like

And just blow away all of my stuff that’s on my pi? That’s your answer?

You didn’t mention that. And it wasn’t me to ignore the docs and to choose to run OH on a box with something else on there (against all recommendations). Good luck with figuring that out yourself then.

I’m still wondering if I can get the openhabian config to use the 64 bit zulu if I unstall openhabian and the 32 bit zulu and then install the 64 bit zulu and redownload openhabian and run the openhabian config script. This pi has 8 gigs of ram so I would think that it can do more than run only openhabian.

I’m sure you can do it, just you will need to support and work it out on your own plus you may run into more bugs from using a non standard setup. You can install multiple java versions on a system at the same time and select between them with a command that escapes me right now. Every time u hit a bug you would need to retest if it occurred so being able to flick between them is worth setting up if you are determined to do that. Google will have guides on how to setup java.

No need to wipe the system for something as simple as installing java but if you have to ask how it is done, this is an indication that it is probably not the right way for you.

Lastly it is not hard to backup and restore the installation if you want to move to a standardised setup.