Ozone - Quickstart install script failed due to JAVA_HOME variable

Hi all,

Trying to follow the quick start instructions to install Ozone. It is a Ubuntu 24.04 server VM, fresh install. I ran the command:

curl -s https://raw.githubusercontent.com/ozone-his/ozone/main/scripts/install-stable.sh | bash /dev/stdin

After installing Apache Maven, the script failed with the following error:

[INFO] Download and extract Ozone 1.0.0-alpha.11...
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.

I’m sure it’s something obvious - any advice to fix this?

Hey @andylinton,

From the error logs it seems like JAVA_HOME environment variable is not set on your machine. Can you try running echo $JAVA_HOME command to verify the path.

Depending on your OS you should be able to set the JAVA_HOME environment variable by a simple google search.

Thanks for the reply.

If I run echo $JAVA_HOME it is empy, so I guess the variable is not set. I can set it… not sure what it needs to be set to.

Also, given this is a fresh install of Ubuntu, this problem is likely to affect other users. Should the instructions to set the JAVA_HOME variable be included in the Ozone quick start documentation, or the install script itself?

Installation of Java is a prerequisite to run Ozone, that is why including Java installation steps in the Ozone documentation might not be the best idea.

I could find this website which will walk you through all the steps to install Java on an Ubuntu machine. Hope this helps.

2 Likes

Thanks, yes I was able to install java with sudo apt install default-jdk and it worked fine.

Perhaps it would be good to include that as a note in the quick-start documentation for Ozone HIS? At https://docs.ozone-his.com/ I didn’t see any pre-requisites before running the Ozone install script.

1 Like