简体   繁体   English

如何在 Netbeans 中使用模块路径构建

[英]How to build with module path in Netbeans

Currently when I build my Java programs in Netbeans it asks for a classpath and wants to build with a classpath.目前,当我在 Netbeans 中构建我的 Java 程序时,它要求提供一个类路径并希望使用一个类路径进行构建。 However, keeping with the growing modular focus of Java 9+ I would rather compile with a module path.但是,为了与 Java 9+ 日益增长的模块化重点保持一致,我宁愿使用模块路径进行编译。

I would run the command javac ... --module-path *.java but have complex dependencies and so would prefer to build it in Netbeans if there is that option available?我会运行命令javac ... --module-path *.java但具有复杂的依赖关系,因此如果有该选项可用,我更愿意在 Netbeans 中构建它?

  • Select your project in the Projects panel在“项目”面板中选择您的项目
  • Right click and select Properties from the context menu.右键单击并从上下文菜单中选择属性
  • Select Libraries from the list of Categories类别列表中选择
  • Click the various tabs ( Compile , Run , etc...) to set ModulePath as required.单击各种选项卡(编译运行等...)以根据需要设置ModulePath

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM