I am new to manjaro. I am trying to use Code-OSS and install the Java integration. Unfortunately I have a problem when using maven. A message appears that JAVA_HOME is invalid. The environment variable is set and maven works in the terminal. Somehow the access to the JAVA_HOME seems to be blocked.
I have fixed it for now by manually adding this lines in the mvn script:
if [[ -z "${JAVA_HOME}" ]]; then
export JAVA_HOME="/home/maik/.sdkman/candidates/java/21-open"
fi
However, this cannot be a permanent state. The script will be replaced with the next update.
No, i have installed java and maven with sdkman, under ~/.sdkman/candidates/java/21-open. Later i need GraalVM and tests with various java versions.
With sdkman i can quickly install several Java versions in the user folder as well as many other tools.
The simultaneous use of different Java versions is supported by default in Manjaro
Then all versions are kept up to date. You can use every single one of them in your projects
And you can even change a default implementation via script that automatically sets $JAVA_HOME
Sorry, but I have no problem with Java or setting JAVA_HOME. I am professionally involved in the creation and maintenance of complex Java applications. There is a problem with Code-OSS. It cannot read the JAVA_HOME environment variable. Everything works as desired in the terminal. There is also another problem: Github.Copilot does not work either.
But I think I have found a solution. In future I will use the original version from Microsoft.
Manjaro seems to have the same problem as Ubuntu. The new package formats simply don’t work properly. I have been using Ubuntu for almost 18 years and have tried to get used to it. Nevertheless, I’m about to switch because more and more software is forced as a snap and no longer works.