Skip to content

Commit

Permalink
Merge pull request docker#347 from jdleesmiller/dockercon-eu-review
Browse files Browse the repository at this point in the history
Add note about JDK9 to non-JDK9 Java chapter
  • Loading branch information
Mano Marks authored Oct 16, 2017
2 parents 331bd99 + 31f6469 commit 1cb986a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion developer-tools/java/chapters/ch01-setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This section describes the hardware and software needed for this workshop, and h
. Operating System: Mac OS X (10.10.3+), Windows 10 Pro+ 64-bit, Ubuntu 12+, CentOS 7+.
+
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.
. 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.
. 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.

== Install Docker

Expand Down
22 changes: 22 additions & 0 deletions developer-tools/java/chapters/ch03-build-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,28 @@ busybox latest 54511612f1c4 9 days ago

=== Create a simple Java application

[NOTE]
====
If you are running OpenJDK 9, `mvn package` may fail with
[source, text]
----
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project helloworld: Compilation failure: Compilation failure:
[ERROR] Source option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
----
because support for Java 5 http://openjdk.java.net/jeps/182[was dropped in JDK9].
You can add
[source, xml]
----
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
----
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.
====

Create a new Java project:

[source, text]
Expand Down

0 comments on commit 1cb986a

Please sign in to comment.