On Mon, 21 Nov 2022 15:40:19 GMT, Christian Stein <cst...@openjdk.org> wrote:
> This PR copies the `CommandLine.java` file from module `jdk.compiler` > (package `com.sun.tools.javac.main`) into the `jdk.internal.opt` module, > creating a new package with name `jdk.internal.opt`. That new > `jdk.internal.opt` package is then exported to the following modules: > - `jdk.jartool` > - `jdk.jlink` > - `jdk.jpackage` > > Now, `jar`, `jlink`, and `jpackage` use a shared `CommandLine` class. In a > future commit (presumable for JDK 21) the original `CommandLine.java` file > in `jdk.compiler` can and will be replaced with this new one in > `jdk.internal.opt`. Same goes for the `jdk.javadoc` module. > > - [x] Keep `CommandLine.java` in `jdk.compiler` module for the time being due > to "JDK N-1 rule". > - [x] Keep `CommandLine.java` in `jdk.javadoc` module for the time being due > to "JDK N-1 rule". > - [x] Remove `CommandLine.java` from `jdk.jartool` module > - [x] Remove `CommandLine.java` from `jdk.jlink` module > - [x] Remove `CommandLine.java` from `jdk.jpackage` module > - [x] Check for related but renamed(?) usages of `CommandLine.java` in other > JDK tools: `jshell`, `jdeps`, `jfr`, ... This pull request has now been integrated. Changeset: a80552e1 Author: Christian Stein <cst...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/a80552e1e15fba42e0e647248a3d50fa44c5bf53 Stats: 519 lines in 10 files changed: 35 ins; 477 del; 7 mod 8236919: Refactor com.sun.tools.javac.main.CommandLine into a reusable module for other JDK tools Reviewed-by: jjg ------------- PR: https://git.openjdk.org/jdk/pull/11272