Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Onboard java to build #493

Merged
merged 6 commits into from
Aug 18, 2020
Merged

Onboard java to build #493

merged 6 commits into from
Aug 18, 2020

Conversation

Chuxel
Copy link
Member

@Chuxel Chuxel commented Aug 15, 2020

This PR on-boards the java container into the image build process and is part of work for #154.

Currently it will output the following image variants for Java versions:

mcr.microsoft.com/vscode/devcontainers/java:11
mcr.microsoft.com/vscode/devcontainers/java:14

...based on the contents of base.Dockerfile.

Note that we generally we drop no longer supported versions of Java from the build process once the version is out of support. However, existing tags, just with an older image.

Note that this does not include Java 8 because the Java extension seems to require it be set to Java home, and there appears to be no good way with symlinks to get this to work consistently because "java.configuration.runtimes" appears to force you to enter a specific "name" value. It would need its own dedicated build. (As an aside, I'm really surprised there isn't a "java.extension.home" property or something like that added.)

In the next VS Code release, the default Dockerfile in the container will use this instead, but without the "dev-" prefix. The image includes nvm, but doesn't install Node in the image since it isn't always needed for Java development, but can be useful in web development involving Java.

It also has scripts to install Maven and Gradle referenced from both dockerfiles, but they are not in the image given mvnw / gradlew are often used.

//cc: @testforstephen @akaroml - Let me know what you think.

@testforstephen
Copy link
Collaborator

Note that this does not include Java 8 because the Java extension seems to require it be set to Java home, and there appears to be no good way with symlinks to get this to work consistently because "java.configuration.runtimes" appears to force you to enter a specific "name" value. It would need its own dedicated build. (As an aside, I'm really surprised there isn't a "java.extension.home" property or something like that added.)

There is a "java.home" user setting exposed by vscode-java extension. And the Java extension will check this setting first, then the JAVA_HOME environment variable.

About running Java 8 application with latest vscode-java extension, i replied a comment at #495 (comment).

@Chuxel Chuxel merged commit 04c8dcd into master Aug 18, 2020
@Chuxel Chuxel deleted the clantz/onboard-java branch August 22, 2020 15:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants