更新时间:2022-06-12 00:38:48
简而言之,添加一个名为module-info.java
的丢失/放错位置的类,以将项目的模块声明包含在项目的源根目录中. (例如src/main/java
)
In short, add a missing/misplaced class named module-info.java
to include your project's module declaration at your project's source root. (e.g src/main/java
)
此外,请注意升级到版本3.7.0 (如果您有 注释)中的您的module-info
类 . [日志似乎与此有关.]
Additionally, note to upgrade to the version 3.7.0 of the maven-compiler-plugin
in case you have a comment included in your module-info
class. [The logs seems pretty relevant to this.]
Or the other way, if you wish to compile your project with a previous version of Java then use the release
flag as:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>8</release>
<verbose>true</verbose>
</configuration>
</plugin>
使用Java9标记项目的完成拼图,其中引入了 Java平台模块系统(JPMS),基于Java版本9及更高版本的项目将被模块化.这将包括一个名为module-info.class
的主要编译类,即模块的声明.
With Java9 marking the completion of the project Jigsaw therein introducing the Java Platform Module System (JPMS), projects build on Java version 9 and above would be modularised. This would include a primary compiled class called module-info.class
which is that module's declaration.
初始草案,最后是模块系统的状态最能说明所遵循和实践的概念.>
The initial draft and eventually The State of the Module System describes best over the concepts followed and practiced.
使Eclipse Oxygen当前版本成为一个额外的技巧 与Java 9兼容
An additional trick regard making Eclipse Oxygen current version compatible with Java 9
AFAIK 最新的氧气生成器(此时为Oxygen.2) 来自Eclipse的目的是要与Java9兼容,而不再需要任何其他插件支持.
AFAIK the latest Oxygen builds (Oxygen.2 at this point in time) from Eclipse are meant to be Java9 compatible without any additional plugin support anymore.