{"id":511,"date":"2020-06-15T01:07:20","date_gmt":"2020-06-14T13:07:20","guid":{"rendered":"http:\/\/wp.gaborhargitai.hu\/?p=511"},"modified":"2020-06-15T01:08:23","modified_gmt":"2020-06-14T13:08:23","slug":"unifi-controller-could-not-find-java-se-runtime-environment-under-macos","status":"publish","type":"post","link":"https:\/\/wp.gaborhargitai.hu\/unifi-controller-could-not-find-java-se-runtime-environment-under-macos\/","title":{"rendered":"Unifi Controller: Could not find Java SE runtime environment under macOS"},"content":{"rendered":"\n
Starting the Unifi Controller under recent macOS versions with OpenJDK installed can cause problems, such as one of the following warnings:<\/p>\n\n\n\n
I’m going to assume you have Adopt OpenJDK installed, preferably via Homebrew – if not, then install Homebrew and then:<\/p>\n\n\n\n
brew tap AdoptOpenJDK\/openjdk\nbrew cask install adoptopenjdk8<\/code><\/pre>\n\n\n\nAfter this, you should be able to run Java runtime on your Mac – let’s get back to making UniFi Controller run.<\/p>\n\n\n\n
First, we need to link our current Java to the UniFi.app<\/p>\n\n\n\n
sudo ln -s \/Library\/Java\/JavaVirtualMachines\/adoptopenjdk-8.jdk\/ \/Applications\/UniFi.app\/Contents\/PlugIns<\/code><\/pre>\n\n\n\nThen we need to open and edit Info.plist<\/code>:\u00a0<\/p>\n\n\n\nsudo nano \/Applications\/UniFi.app\/Contents\/Info.plist<\/code><\/pre>\n\n\n\nAnd add the following JVMRuntime<\/code> section manually after the\u00a0JVMOptions<\/code><\/p>\n\n\n\n<key>JVMRuntime<\/key>\n<string>adoptopenjdk-8.jdk<\/string><\/code><\/pre>\n\n\n\nAfter this, the UniFi Controller should run without problems.<\/p>\n\n\n\n
Reposted from the Ubiquiti forum – original author: Andrea<\/a>s<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Starting the Unifi Controller under recent macOS versions with OpenJDK installed can cause problems, such as one of the following warnings: Could not find a JRE. Will look for a JDK. ERROR: could not find Java SE runtime\u00a0 I’m going to assume you have Adopt OpenJDK installed, preferably via Homebrew – if not, then install […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,17,49],"tags":[],"_links":{"self":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/511"}],"collection":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/comments?post=511"}],"version-history":[{"count":2,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/511\/revisions"}],"predecessor-version":[{"id":513,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/511\/revisions\/513"}],"wp:attachment":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media?parent=511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/categories?post=511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/tags?post=511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}