Equivalent of “Order and export” of Eclipse in Netbeans

南笙酒味 提交于 2020-01-22 03:24:04

问题


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?


回答1:


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".



来源:https://stackoverflow.com/questions/15852802/equivalent-of-order-and-export-of-eclipse-in-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!