Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 1cb986a

Browse files
author
Mano Marks
authored
Merge pull request #347 from jdleesmiller/dockercon-eu-review
Add note about JDK9 to non-JDK9 Java chapter
2 parents 331bd99 + 31f6469 commit 1cb986a

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

developer-tools/java/chapters/ch01-setup.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This section describes the hardware and software needed for this workshop, and h
1212
. Operating System: Mac OS X (10.10.3+), Windows 10 Pro+ 64-bit, Ubuntu 12+, CentOS 7+.
1313
+
1414
NOTE: An older version of the operating system may be used. The installation instructions would differ slightly in that case and are explained in the next section.
15-
. Amazon Web Services credentials with https://docs.docker.com/docker-for-aws/iam-permissions/[following permissions]. This is only needed for some parts of the workshop.
15+
. Amazon Web Services credentials with the https://docs.docker.com/docker-for-aws/iam-permissions/[following permissions]. This is only needed for some parts of the workshop.
1616

1717
== Install Docker
1818

developer-tools/java/chapters/ch03-build-image.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,28 @@ busybox latest 54511612f1c4 9 days ago
115115

116116
=== Create a simple Java application
117117

118+
[NOTE]
119+
====
120+
If you are running OpenJDK 9, `mvn package` may fail with
121+
[source, text]
122+
----
123+
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project helloworld: Compilation failure: Compilation failure:
124+
[ERROR] Source option 1.5 is no longer supported. Use 1.6 or later.
125+
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
126+
----
127+
because support for Java 5 http://openjdk.java.net/jeps/182[was dropped in JDK9].
128+
129+
You can add
130+
[source, xml]
131+
----
132+
<properties>
133+
<maven.compiler.source>1.6</maven.compiler.source>
134+
<maven.compiler.target>1.6</maven.compiler.target>
135+
</properties>
136+
----
137+
to the generated `pom.xml` to target 1.6 instead. See also the link:chapters/ch03-build-image-java-9.adoc[Build a Docker Image for Java 9] chapter.
138+
====
139+
118140
Create a new Java project:
119141

120142
[source, text]

0 commit comments

Comments
 (0)