Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct way to setup plain java with maven? #1244

Open
nmwael opened this issue Nov 28, 2024 · 2 comments
Open

Correct way to setup plain java with maven? #1244

nmwael opened this issue Nov 28, 2024 · 2 comments

Comments

@nmwael
Copy link

nmwael commented Nov 28, 2024

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.

@Netz00
Copy link

Netz00 commented Nov 30, 2024

The JAVA_HOME environment variable is set to:

/usr/lib/jvm/msopenjdk-current

However, root privileges are required to access this directory.

@LeeNikki69
Copy link

#S.M.h//*FuM3L3/0.o/2L8Nw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants