Java installation not found

Note - If you do not fill in every section below, your post won’t be answered - you must provide the steps you have followed so far and the actions you’ve already taken. Make sure to remove this notice from your post too.

OS Name/Version: Ubuntu Server 22.04 LTS

Product Name/Version: AMP Release “Triton” (v2.3.4.3, built 12/07/2022 13:00)

Problem Description:

I have installed AMP on a fresh installed Ubuntu-Server (22.04 LTS).
AMP is installed for managing my Servers. Such as Minecraft-Servers...
Currently i am using openjdk-20ea as java edition. Works perfectly fine when i start my Servers via a bash-script. But AMP is not showing that i have "installed" java. I mean i haven´t done that with a packet-manager but i changed my .bashrc (for all users) also /etc/environment ans added the java-paths. Actualy that does not work either... 

**The error i see all the time...**
'java' is not installed, or not available in PATH. Please make sure Java 8 is installed on your system. If you have just installed Java then you will need to restart AMP.

**Fun fact... java --version works fine**
openjdk 20-ea 2023-03-21
OpenJDK Runtime Environment (build 20-ea+7-379)
OpenJDK 64-Bit Server VM (build 20-ea+7-379, mixed mode, sharing)

Actions taken to resolve so far:
As written above… changed some settings to convince amp, that java is installed…

Is there a possibility to teach AMP that it has to look in a specific directiory?
Or is there a help page that shows how to set things up correctly?

Run this as root:

bash <(wget -qO- installJava

Well am am aware of this command… but that is not what i am looking for.
But from this answer i asume that there is no way to tell AMP that there is custom java installed…

Verry sad. Makes this more or less useless for me :frowning:

You can edit MinecraftModule.kvp to manually tell it where Java is located, but there’s zero reason to do this. Mainly because if Java is installed correctly then you don’t need to do this at all, it just picks it up from $PATH.

What you want to check is that if you login as the amp user (switch by doing sudo su -l amp) - that you can then do java --version - you also want to check that echo $PATH contains the directory of your java installation. If it doesn’t, AMP won’t find it.

Thank you for the help.

I figured out an other solution…

Java that is installed by the AMP-Installer are stored here: /usr/lib/jvm
Just navigate into this directory and wget your desired openjdk-version… unpack and done!
Restart AMP and java will apear in the list.

Works fine for me