How to define JRE 11 if JRE 11 is NOT in command path

The JRE i genereally use is < then version 11. And that smaller version is in the command path (%PATH%). So i need to define manually the (at least) Version 11 (i downloaded JRE/JDK V14 from Zulu, hope it will work) in the start script (.bat for Windows, .sh for Linux)

Do i need to add parameter (java(.exe) executable path) for run.bat or run.sh or do i need to change the script itself?

Thank you for your feedbacks.

With best regards,
Jan

And run.bat /? or run.bat --help does not give me any help texts…

Regards, Jan

Does nobody know how to solve that issue?

Thank you for your feedbacks. :slight_smile:

With best regards,
Jan

No answer / adequate solution for my issue?

Kind regards,
Jan

Hi @xdev,

I use this approach (as there is seems to be no equivalent to jenv for Windows): https://www.youtube.com/watch?v=IdmNIOs3Xqo

This mean for HiveMQ:

  • open shell
  • run install java11 bat
  • run hivemq run.bat

Hope this helps in your case.

Kind regards,
Michael from the HiveMQ team

Hi Michael

I had that issue on Windows, my default JRE is there still Java 8. But that was just for testing purposes…

In production, it will run on Linux. I’ve tested it with Debian 9 “Stretch” and the Java 11 from “Zulu”. Seems to work well.

Best regards,
Jan