Member-only story
Java Classpath, know it, and use it correctly!

Java can be a deep pool when you first start. One challenge I remember having bouts with was the CLASSPATH. Let’s clear up any challenges you might have once and for all!
Before I was really a Java developer I downloaded the Java Development Kit or JDK and played around. In other words, I ran through some examples but, occasionally had issues with the CLASSPATH.
What
Talking about Java it is best to get your information from the source, Oracle. They describe the classpath this way, “The classpath tells the JDK tools and applications where to find third-party and user-defined classes that are not extensions or part of the Java platform.” Essentially this is how Java looks for code to run.
CLASSPATH and Path
Although we discussed the PATH before here we haven’t talked about CLASSPATH. The CLASSPATH helps the Java Virtual Machine or JVM know where to look for resources. The PATH is geared toward the operating system.
If you are on Windows it needs to know where to look for the file or application you are running. The same goes for your Mac or Linux computer. Each just goes about it slightly differently.