Skip to content

Commit 78f8ddd

Browse files
authored
Merge pull request #214 from jmtd/OPENJDK-390-fix-runtime-java-home
[OPENJDK-390] fix JAVA_HOME for runtime images
2 parents b45cb29 + b1debf7 commit 78f8ddd

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

modules/jre/11/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ labels:
1414

1515
envs:
1616
- name: "JAVA_HOME"
17-
value: "/usr/lib/jvm/java-11"
17+
value: "/usr/lib/jvm/jre"
1818
- name: "JAVA_VENDOR"
1919
value: "openjdk"
2020
- name: "JAVA_VERSION"

modules/jre/8/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ labels:
1414

1515
envs:
1616
- name: "JAVA_HOME"
17-
value: "/usr/lib/jvm/java-1.8.0"
17+
value: "/usr/lib/jvm/jre"
1818
- name: "JAVA_VENDOR"
1919
value: "openjdk"
2020
- name: "JAVA_VERSION"

tests/features/java/openjdk.feature

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TODO: it would be nice to make the below less specific to 8 & 11. What about when 12
22
# is released, etc.
3-
Feature: Container only has one OpenJDK version installed
3+
Feature: Miscellaneous OpenJDK-related unit tests
44

55
@redhat-openjdk-18/openjdk18-openshift
66
@openjdk/openjdk-1.8-ubi8
@@ -23,3 +23,12 @@ Feature: Container only has one OpenJDK version installed
2323
| arg | value |
2424
| command | rpm -qa |
2525
Then available container log should not contain java-1.8.0
26+
27+
@ubi8
28+
@openjdk
29+
@openj9
30+
Scenario: Ensure JAVA_HOME is defined and contains Java
31+
When container is started with args
32+
| arg | value |
33+
| command | bash -c "$JAVA_HOME/bin/java -version" |
34+
Then available container log should contain OpenJDK Runtime Environment

0 commit comments

Comments
 (0)