Ecj: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | =External= | ||
* http://blog.deepakazad.com/2010/05/ecj-eclipse-java-compiler.html | * http://blog.deepakazad.com/2010/05/ecj-eclipse-java-compiler.html | ||
* https://download.eclipse.org/eclipse/downloads/ | |||
* http://manpages.ubuntu.com/manpages/focal/man1/ecj.1.html | |||
=Overview= | =Overview= | ||
ecj (Eclipse Compiler for Java) | ecj (Eclipse Compiler for Java) also known as JDT Core Batch Compiler. | ||
=Configuration= | |||
==Java 9 Module Configuration== | |||
To get to compile pre-Java 9 code that uses classes which are now packaged in their own modules, ecj can be configured using the following syntax: | |||
<syntaxhighlight lang='text'> | |||
... --add-exports <source-module>/<package>=<target-module>(,<target-module>)* | |||
</syntaxhighlight> | |||
<code>--add-exports</code> is a command line export statement which exports the <package> specified in the <source-module> to the comma-separated list of target modules: | |||
<syntaxhighlight lang='text'> | |||
... --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED | |||
</syntaxhighlight> | |||
For multiple packages, <code>--add-exports</code> can be specified multiple times. | |||
Also see: {{Internal|Java_9_Modules#Operations|Java 9 Modules Operations}} |
Latest revision as of 00:10, 20 May 2021
External
- http://blog.deepakazad.com/2010/05/ecj-eclipse-java-compiler.html
- https://download.eclipse.org/eclipse/downloads/
- http://manpages.ubuntu.com/manpages/focal/man1/ecj.1.html
Overview
ecj (Eclipse Compiler for Java) also known as JDT Core Batch Compiler.
Configuration
Java 9 Module Configuration
To get to compile pre-Java 9 code that uses classes which are now packaged in their own modules, ecj can be configured using the following syntax:
... --add-exports <source-module>/<package>=<target-module>(,<target-module>)*
--add-exports
is a command line export statement which exports the <package> specified in the <source-module> to the comma-separated list of target modules:
... --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED
For multiple packages, --add-exports
can be specified multiple times.
Also see: