This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
developer-tools/java/chapters Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,27 @@ busybox latest 54511612f1c4 9 days ago
115
115
116
116
=== Create a simple Java application
117
117
118
+ [NOTE]
119
+ ====
120
+ If you are running OpenJDK 9, `mvn package` may http://openjdk.java.net/jeps/182[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
+
128
+ You can add
129
+ [source, xml]
130
+ ----
131
+ <properties>
132
+ <maven.compiler.source>1.6</maven.compiler.source>
133
+ <maven.compiler.target>1.6</maven.compiler.target>
134
+ </properties>
135
+ ----
136
+ 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.
137
+ ====
138
+
118
139
Create a new Java project:
119
140
120
141
[source, text]
You can’t perform that action at this time.
0 commit comments