[英]NetBeans 12 doesn't manage libraries anymore
A week ago I upgraded my Java IDE to Netbeans 12 (and JDK 14), and only yesterday I noticed the window Project Properties (MYPROG) lacks of essential functionality ie there are not lines for compiling in *.jar
, and mostly there is not any line for adding *.jar
libraries, there is instead an empty line for JavaScript
libraries, and it is impossible to add them in any other point. A week ago I upgraded my Java IDE to Netbeans 12 (and JDK 14), and only yesterday I noticed the window Project Properties (MYPROG) lacks of essential functionality ie there are not lines for compiling in *.jar
, and mostly there is not任何添加*.jar
库的行, JavaScript
库的行是空行,并且不可能在任何其他点添加它们。
The real oddity of NetBeans 12 is that it works perfectly even with old projects made with NetBeans 8 and JDK6. NetBeans 12 的真正奇怪之处在于,即使是使用 NetBeans 8 和 JDK6 制作的旧项目,它也能完美运行。 but reinstalling previous NetBeans 10 still remaisn a trouble.但是重新安装以前的 NetBeans 10 仍然很麻烦。 I'm stuck making new projects that need libraries: Minor problems are: System.err.println
doesn't write in red colour, the path src/mycode
has become src/main/java/mycode
, why?我一直在制作需要库的新项目: 小问题是: System.err.println
没有写成红色,路径src/mycode
已变为src/main/java/mycode
,为什么? and perhaps many others.也许还有许多其他人。 My attempts are over.我的尝试结束了。 I've installed我已经安装
It's a Java project using Maven这是一个使用 Maven 的 Java 项目
I don't know Gradle and Ant (what are they for?)我不知道 Gradle 和 Ant(它们是干什么用的?)
When you are using Maven, the Project properties do not have a Libraries section, because the libraries are managed through Maven (and not NetBeans).当您使用 Maven 时,项目属性没有库部分,因为库是通过 Maven(而不是 NetBeans)管理的。
You manage the needed libraries through the "Dependencies" node of the project or by editing pom.xml
directly:您可以通过项目的“依赖项”节点或直接编辑pom.xml
来管理所需的库:
But this has been the case since NetBeans started supporting Maven (so probably 8.0 or something along those lines).但自从 NetBeans 开始支持 Maven (所以可能是 8.0 或类似的东西)以来,情况就一直如此。 If you had a "Libraries" section in the project properties before, you were using an Ant based project.如果您之前在项目属性中有“库”部分,则您使用的是基于 Ant 的项目。
path
src/mycode
has becomesrc/main/java/mycode
, why?路径src/mycode
变成了src/main/java/mycode
,为什么?
Because src/main/java
is the default directory layout Maven uses.因为src/main/java
是 Maven 使用的默认目录布局。
If you recreate the project as Ant project, you will have the option to import library in the project properties.如果您将项目重新创建为 Ant 项目,您将可以选择在项目属性中导入库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.