Hi I am a little confused as to what Java i need to install. I have an openhab installation using Zulu-17 as instructed in the setup instructions.
Variable %JAVA_HOME% “C:\Program Files\Zulu\zulu-17”
This was working fine.
When I try to setup for developing I installed Java JDK 17 and set the Variable %JAVA% “C:\Program Files\Java\jdk-17.0.12”
This breaks my openhab install.
The output of Java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
I’d advise that you only install one java,
unless you are already quite proficient in having installed multiple JDK and JRE versions and knowing how to switch between them.
I presume that you are running Windows and that the installed default Java is Java 8.
I would
choose a JDK (really no reason to choose Zulu over any other certified JDK, but no problem using Zulu)
remove all others
Only set JAVA_HOME environment variable
Multiple installations of Java are nifty… IF NEEDED, otherwise confusing.
If you really want to develop, install a single JDK and don’t install a JRE and use the single JDK to run OH and do your dev work
Once you fully understand how to use multiple Java versions, then dive in.
You might double check that you also have your java install defined in the path statement.
In addition to that you will also need a few other items like MAVEN_HOME and M2_HOME defined and included in the Path statement in system section. Make sure you define this in system properties not User section for best results. As stated you can have other Java installs but you must take care to point to correct JAVA_HOME when changing . But regardless ALL installed versions you want to use MUST be defined in the Path statement in system section to be picked up and used.
Edit: Also depending on which IDE you decide to use for developing you may have to define those again inside the IDE and you will need to add a few more dependencies like gitBash and a recent version of python.