Reputation: 807
I'm choking on a few terminologies that are either Java- or NetBeans-specific and I can't seem to get a clear answer as to what they are.
In NetBeans, if you go to File >> Project Properties there is a Category called Libraries which houses, principally, 3 different types of libs:
(1) Compile-Time Libraries (2) Processor-Path Libraries and (3) Runtime Libraries
Can someone explain to me the subtle differences between these libraries? Obviously compile-time and runtime libraries involve things that happen at compile- or run-time, respectively. But I'm not sure what those "things" are. But the processor path libraries is something I've never even heard of.
Also, (4) can someone clarify that by "libraries" we're talking about 3rd party JARs?
Thanks for any and all insight!
Upvotes: 7
Views: 1318
Reputation: 9902
The UI and terminology of the Libraries properties is a bit confusing.
The Help button on the dialog does bring up a pretty good description of various 'types' of libraries, when I looked at a recent nightly build of NetBeans.
I do want to provide a bit more insight on the difference between Compile and Run libraries, though.
A Compile-time library is used at compilation time to resolve symbols and the like while your Java code is converted into classes.
A Run-time library is used to support the actual execution of your program.
The Compile-time library list can be a subset of the Run-time library list, since you may depend on a library A that depends on a library B which is not exposed to clients of A. Your code will compile correctly if A is in the Compile-time library list, but it will trigger ClassNotFoundException's when when you try to run it without B in the Run-time library list.
In the context of the Libraries property editor a library can be:
Upvotes: 3
Reputation: 1013
(1)-(3): Compile-time vs Runtime libraries
(2): apparently, this is used for annotations:
Specifies where to find annotation processors; if this option is not given, the classpath is searched for processors
(4): yes we're talking about 3rd party JARs
Upvotes: 1