Reputation: 2766
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?
Upvotes: 0
Views: 577
Reputation: 2766
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".
Upvotes: 1