How to inject module declaration into JAR?

前端 未结 2 1911
面向向阳花
面向向阳花 2020-11-28 10:43

Suppose I have some library lib.jar for which I do not have the source code (or it is written in some non-Java language which is unaware of modules yet).

2条回答
  •  孤城傲影
    2020-11-28 11:27

    Alternatively, to compile the module-info.java generated you need to also extract the contents of the JAR to a directory.

    Then compile the module-info.java with the output directory (-d) set to the directory where you extracted the contents.

    Credits :- Alan

提交回复
热议问题