等同于“订单和出口”的Eclipse在Netbeans [英] Equivalent of "Order and export" of Eclipse in Netbeans
问题描述
默认情况下,Netbeans似乎优先于项目来源的JAR类。如何更改课程加载顺序?
注意:我在写这个问题时发现了答案,我希望对有类似问题的人有帮助。
转到项目属性 - >库 - >运行并确保编译源在列表中选择它,然后点击上移,就在Classpath for Compiling Sources之上。
I'm using Netbeans 7.2.1 in Ubuntu 12.10 and I'm trying to change the order of class loading. 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. The class in my project sources has a higher priority and I want to use it instead of the class in the JAR. In Eclipse I can change the order under the "Order and export" tab in Project Properties -> Java Build Path.
Netbeans seems to priorize JAR classes higher than project sources by default. 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".
这篇关于等同于“订单和出口”的Eclipse在Netbeans的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!