IntelliJ IDEA项目模块与Java 9模块是否有不同的概念? [英] Is IntelliJ IDEA project Module different concept from Java 9 Module?

查看:263
本文介绍了IntelliJ IDEA项目模块与Java 9模块是否有不同的概念?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从没在IntelliJ IDEA中使用过模块,但是在Java 9中出现过模块(我也从未使用过,但现在想研究一下这是什么)

I never used modules in IntelliJ IDEA, but in Java 9 appeared modules ( which I also never used but wanna study now what is this)

所以问题是:彼此匹配吗?还是IDEA模块出现在很久之前并出于不同的目的?

So the question is: are there match each other? Or IDEA modules appeared long before and for different purposes?

推荐答案

这是一个类似的概念,早在Java 9模块出现之前.它也不是特定于IDE的.当处理包含多个子项目的项目时,诸如Maven和Gradle之类的构建系统也使用此概念.在IntelliJ IDEA术语中,该模块只是一个子项目(在Eclipse中,该模块是一个Project,而Workspace可以具有多个项目).

It's a similar concept that appeared long before Java 9 modules. It's also not IDE specific. Build systems like Maven and Gradle also use this concept when working with the projects that consist of multiple sub-projects. In IntelliJ IDEA terminology the module is just a sub-project (In Eclipse the module is a Project and Workspace can have multiple projects).

Java 9模块映射到IntelliJ IDEA模块,并通过指定以下内容的模块描述符提供附加功能:

Java 9 modules map to IntelliJ IDEA modules and provide additional features via the module descriptor specifying:

  • 它显式提供给其他模块的软件包(所有 模块中的其他软件包对于其他对象是隐式不可用的 模块)
  • 它提供的服务
  • 消费的服务
  • 它还可以反射其他哪些模块
  • the packages it explicitly makes available to other modules (all other packages in the module are implicitly unavailable to other modules)
  • the services it offers
  • the services it consumes
  • to what other modules it allows reflection

IntelliJ IDEA已经具有项目模块的概念.每一个 IntelliJ IDEA模块构建自己的类路径.随着介绍 在新的Java平台模块系统中,IntelliJ IDEA模块必须 通过支持Java平台的模块路径来扩展其功能 如果使用它代替类路径.

IntelliJ IDEA already has a concept of modules for a project. Every IntelliJ IDEA module builds its own classpath. With the introduction of the new Java platform module system, IntelliJ IDEA modules had to extend their capability by supporting the Java platform's module-path if it is used instead of the classpath.

相关链接:

  • IntelliJ IDEA modules explained
  • Migrating From Eclipse to IntelliJ IDEA
  • Understanding Java 9 Modules
  • Getting Started with Java 9 Module System
  • Support for Java 9 Modules in IntelliJ IDEA

这篇关于IntelliJ IDEA项目模块与Java 9模块是否有不同的概念?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆