At work our Java applications use all sorts of non-Java “source” (input) files (XML, properties files, etc.) for runtime configuration.
I’ve heard co-workers use verbiage like “is log4j.properties on the classpath?”
It’s obvious that what they mean by this is: can Java “see” the resource? If we’re talking about code running locally (inside Eclipse), then the files must be in a location where the Eclipse workbench can find them. If we’re talking about automatically building a project from a CI server, then the Ant running on that server must be able to find/see those resources.
My question: is this proper Java terminology for non-Java sources, or is this just a idiom used at my place of work? How can something that isn’t a class exist on the class path?!?
The classpath is just the collection of paths the JVM looks at when trying to resolve the a resource, whether it is a source file or not. If you look at the Java documentation for resources it says
So I think it is perfectly valid to say “is such-and-such resource on the CLASSPATH?” Besides, it gets the point across and I can’t think of a better way to ask the question.