To do that, you need to understand how a program is called from the shell.
If your technology is called acme, located /usr/foo/acme-app/bin/acme, you should add it to the special variable environment called PATH
export ACME_HOME=/usr/foo/acme-app/bin
export PATH=$PATH:$ACME_HOME/bin
Just after that, acme could be used in the shell
acme --help
Some installers do it at installation step but in some cases you need to do it manually.
In your case to have a specific version
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
export PATH=$PATH:$JAVA_HOME/bin
or
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
After that you could confirm the version with
java -version
Sometimes the PATH is dirty with due to your previous installations. I mean in the PATH there are several java versions. You could check with
echo $PATH
If there are several java versions in the path, you just need to erase them and export a new PATH. Here an example of clean and minimal PATH:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
And other no so clean
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-17-oracle/bin:/usr/lib/jvm/java-8-openjdk-amd64:/usr/lib/jvm/java5
In that case, you just need to fix the PATH and add only one java version
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
export PATH=$PATH:$JAVA_HOME/bin
Note: This works while the shell is open. If it is closed or in another shell, PATH is restored. Toset this permanently, check this: How to permanently set $PATH on Linux/Unix