Java versions Older then Java 6 does not support wildcard characters. How to set Multiple Jar Files in Java Classpath That means, the current directory is searched. In case you have not set the classpath environment variable, the default value is used as the '.' (current directory). Since each user/computer may choose to have classes in different location its best to have custom locations configured in Classpath variable. The CLASSPATH variable is a Java way to tell the possible locations of user classes or jar files for a Java application. These are supported by all modern operating systems. This is done by putting folder and jar files on your classpath.Įnvironment variables in general are a set of dynamic name value pair that can be used by processes to decide the behavior based on a system. In such cases, It will become very impractical/slow for the Java Virtual Machine to search for classes in every file/folder on a machine, therefore you can provide the Java Virtual Machine with a list of places to look. You also do a wild card import like org.fromdev.* on your java file. In a Java class import statements are used to access other classes. Why Java uses Classpath parameter or environment variables? Part 7: Java Architect Scalability Questions.