openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
820 stars 251 forks source link

Install 32-bit Java on 64-bit ARM processors #57

Closed dmcwhinnie closed 7 years ago

dmcwhinnie commented 7 years ago

Currently there are known performance and serial device (ZWave) issues when 64-bit java is used. On a 64-bit ARM machine we should instead install 32-bit java.

https://community.openhab.org/t/openhabian-hassle-free-rpi-image/13379/400?u=david

dmcwhinnie commented 7 years ago

Couple notes to add. Note these may be specific to the pine64, and the linux images available for that particular platform.

To install 32-bit Oracle, the following had to be down before downloading and installing from the Oracle website.

  1. enable 3-bit architecture dpkg --add-architecture armhf
  2. install 32-bit libraries apt-get install libc6:armhf libncurses5:armhf libstdc++6:armhf
  3. download and install java 8, 32-bit, from Oracle website
  4. update alternatives so the 32-bit version is the default java version.

At this point, Openhab runs with 32-bit with no issues.

ThomDietrich commented 7 years ago

Hello @dmcwhinnie I'll look into this. Could you provide a few references? If this is supposed to be done by openHABian, we need a fully automated process, similar to https://github.com/openhab/openhabian/blob/master/openhabian-setup.sh#L234-L262

dmcwhinnie commented 7 years ago

@ThomDietrich I think the real issue is going to be getting the 32-bit Oracle. Only place I found it was from the Oracle website, where you have to agree to their terms before downloading through the web browser. I tried to find a way to get it from webupd8team on ppa.launchpad.net, but couldn't find it (or was beyond my abilities). That would be ideal because they have the ability to accept the oracle terms

ThomDietrich commented 7 years ago

https://community.openhab.org/t/im-losing-my-hair-lol/19790/1

ThomDietrich commented 7 years ago

For reference: https://community.openhab.org/t/my-openhab-org-is-online-ios-app-doesnt-show-sitemap-solution-java-update/12858/64

kaikreuzer commented 7 years ago

Just came across this by chance. I can confirm: On 64-bit ARM boards like the PINE64, you'll need to do

dpkg --add-architecture armhf
apt-get install libc6:armhf libncurses5:armhf libstdc++6:armhf

afterwards, 32-bit Java works well. This is what I did for the PINE64 SD card image as well.

Wrt the Oracle license issue: We should anyhow move to Zulu Embedded, which works well as 32-bit on the PINE64 as well with the above steps.