Clojure namespaces might be familiar to you, as a Java developer, and for a very good reason, they have a very deep relationship with Java's packages and the classpath.
First of all, let's review what we already know from Java.
The Java code is organized in packages, a package in Java is a namespace that allows you to group a set of similar classes and interfaces.
You can think of a package as something very similar to a folder in your computer.
The following are some common packages that you use a lot when programming in Java:
java.lang
: Everything that's native to Java, including basic types (integer, long, byte, boolean, character, string, number, short, float, void, and class), the basic threading primitives (runnable, thread), the basic primitives for exceptions (throwable, error, exception), the basic exceptions and errors (NoSuchMethodError
,OutOfMemoryError
,StackOverflowError
, and so on) and runtime access classes like runtime and system.java...