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

Added support for java version 17 in cli #645

Merged
merged 2 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions langs/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func init() {

registerHelper(&GoLangHelper{Version: "1.15"})
// order matter, 'java' will pick up the first JavaLangHelper
registerHelper(&JavaLangHelper{version: "17"})
registerHelper(&JavaLangHelper{version: "11"})
registerHelper(&JavaLangHelper{version: "8"})
registerHelper(&NodeLangHelper{Version: "14"})
Expand Down
4 changes: 4 additions & 0 deletions langs/java.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ func (h *JavaLangHelper) BuildFromImage() (string, error) {
return fmt.Sprintf("fnproject/fn-java-fdk-build:%s", fdkVersion), nil
} else if h.version == "11" {
return fmt.Sprintf("fnproject/fn-java-fdk-build:jdk11-%s", fdkVersion), nil
} else if h.version == "17" {
return fmt.Sprintf("fnproject/fn-java-fdk-build:jdk17-%s", fdkVersion), nil
} else {
return "", fmt.Errorf("unsupported java version %s", h.version)
}
Expand All @@ -81,6 +83,8 @@ func (h *JavaLangHelper) RunFromImage() (string, error) {
return fmt.Sprintf("fnproject/fn-java-fdk:%s", fdkVersion), nil
} else if h.version == "11" {
return fmt.Sprintf("fnproject/fn-java-fdk:jre11-%s", fdkVersion), nil
} else if h.version == "17" {
return fmt.Sprintf("fnproject/fn-java-fdk:jre17-%s", fdkVersion), nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good time to stop naming something as JRE, this concept is no longer valid for Java since JDK 11.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What can it named as we are having a concept of creating two images. One for the build image and other for the run image so it is not exactly the jre but the run image for the fdk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestion. We are going to pick this up in future https://jira.oci.oraclecorp.com/browse/FAAS-7797

} else {
return "", fmt.Errorf("unsupported java version %s", h.version)
}
Expand Down