My.openhab won't load related to infrequent Java crashes?

My Openhab has been working, for the most part, really great (thanks in no small part to @rlkoshak !) but every few weeks I’ll try to log into it from my phone and receive nothing but the spinning wheel. On 2 such occasions I was was not able to ssh into the pi, and plugging in an hdmi cable did nothing (even after I gave in and pulled the plug). Eventually, both times, what got it to start back up was to pull the OpenHAB installed SD card, put another sd card in there with a different Raspbian installation, boot it up, then shut it down and put the old Openhab loaded Raspbian sd card back in (SO bizarre right?).

However this time when it happened, I can no longer access my sitemap through the my.openhab url. I can access it inside my lan by going to the pi’s ipaddress:openhabport but nothing ever shows up in my.openhab. I have the right uuid and secret in my.openhab, I double checked the files in webapps/static and I have security:option=external and myopenhab:localPort=openhabport defined in openhab.cfg (and again, the setup is from what I can tell unchanged).

On that same instructional page I saw something regarding an issue with openjdk so I checked my java -version and it told me it had crashed! A fatal error has been detected by the Java Runtime Environment SIGILL (0x4) at pc…etc so I started googling java and found some tricks suggested here that I employed (mostly from here). After a reboot Java is up and running and is the oracle 8.0 version. I’m hoping this fixes the once-every-couple-of-weeks crash of the system but, alas, I still can’t access the UI through my.openhab.

Does anyone have any suggestions?

Make sure you have the latest oracle java 101, you may read more about a recent certificate change for my openhab here:

Ahhhh apt-get was telling me on was on the latest java and had a trademark symbol so I assumed it was oracles. I guess its a bit more involved that all that. Thanks! I’ll comb through all these different options for upgrading and report back.

Thanks for the heads up! Following these instructions worked:

My final question is, since apt-get had me on the latest version of oracle java, why didn’t that work? I’m just concerned that I’m gonna run into an issue in the future when some with some weird issue that will be solved by an update to java but I’ll forget that I pointed the system at a static one in the /opt folder. Any best practice suggestions? I’d prefer to use the apt-get version so it gets updated along with everything else…(maybe that’s dumb)

edit: I found this post in the thread you linked too is online // iOS app doesn't show sitemap -> Solution: Java update! I take it this is my answer…