From c497a2ab16d35ec9984bb7ddd04af98580a2c4cc Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Wed, 8 Jan 2020 01:23:26 +0100 Subject: Update javac documentation regarding the module system --- website/templates/setup/javac.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/website/templates/setup/javac.html b/website/templates/setup/javac.html index 96bd8c2b..9e4a717b 100644 --- a/website/templates/setup/javac.html +++ b/website/templates/setup/javac.html @@ -1,13 +1,22 @@ <#import "_setup.html" as s> <@s.scaffold title="JavaC"> - <@s.introduction> + <@s.section title="JDK9+ with module-info.java"> +

+ Support for JDK9+ if you did modularize your own projects (you've written a module-info.java file):
javac -cp lombok.jar -p lombok.jar ...
+ Note that you will have to add lombok to your module-info.java file:

+module myapp {
+	requires static lombok;
+}
+

+ The 'static' part ensures that you won't need lombok to be present at runtime. +

+ + + <@s.section title="JDK 1.6 - 1.8 or no modules in later versions">

Just put lombok on the classpath when compiling with any javac (version 1.6 - 1.8): javac -cp lombok.jar ....

- - - <@s.section title="JDK 9">

Support for JDK9, if you haven't modularized your own projects yet (no module-info.java yet), is included in lombok starting with version 1.16.20. Just use lombok as normal: javac -cp lombok.jar ...

@@ -20,4 +29,5 @@ module myapp { The 'static' part ensures that you won't need lombok to be present at runtime.

+ -- cgit