images
images copied to clipboard
Correct way to setup plain java with maven?
I have this
"image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
}
},
When running my maven command:
mvn clean install
I get the error message:
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.
I would have expected that JAVA_HOME would be setup? I would also expect that the JDK or JRE installed would be the most upstream origin, eg OpenJDK.. It seems it an MS variant.
The JAVA_HOME environment variable is set to:
/usr/lib/jvm/msopenjdk-current
However, root privileges are required to access this directory.
#S.M.h//*FuM3L3/0.o/2L8Nw