简体   繁体   English

在Netbeans中等效于Eclipse的“订购和出口”

[英]Equivalent of “Order and export” of Eclipse in Netbeans

I'm using Netbeans 7.2.1 in Ubuntu 12.10 and I'm trying to change the order of class loading. 我在Ubuntu 12.10中使用Netbeans 7.2.1,并且试图更改类加载的顺序。 I have two classes in same package with the same name, but one is in my sources and the other one is in a JAR. 我在同一个包中有两个具有相同名称的类,但是一个在我的源代码中,另一个在JAR中。 The class in my project sources has a higher priority and I want to use it instead of the class in the JAR. 项目源中的类具有更高的优先级,我想使用它而不是JAR中的类。 In Eclipse I can change the order under the "Order and export" tab in Project Properties -> Java Build Path. 在Eclipse中,我可以在Project Properties-> Java Build Path的“ Order and export”选项卡下更改订单。

“订购和出口”

Netbeans seems to priorize JAR classes higher than project sources by default. 默认情况下,Netbeans似乎将JAR类的优先级高于项目源。 How do I change the class loading order? 如何更改课程的加载顺序?

Note: I discovered the answer while I was writing the question and I hope it will be helpful for someone with a similar problem. 注意:我在写问题时发现了答案,希望对有类似问题的人有所帮助。

Go to Project Properties -> Libraries -> Run and make sure that "Compiled Sources" is above "Classpath for Compiling Sources" by selecting it in the list and clicking "Move Up". 转到项目属性->库->运行,并通过在列表中选择它并单击“向上移动”,确保“编译的源代码”在“编译源的类路径”上方。

运行时库

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

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