What happens if a class (x.java) file exists both in th开发者_如何学Pythone current project and in the library it uses. Which one will it take?
It should be the one first loaded by the order defined in Project Properties->Java Build Path->Order and Export.
The projects binaries should come first.
System.out.println(System.getProperty("java.class.path");
prints the current classpath to the console - in my case, the projects bin folder is the first entry, followed by the projects libraries.
Note - with the above statement I can confirm zeropages answer. Changing the projects properties ("Order and export") changes the classpath which can be verified through the above statement.
精彩评论