I am trying to set the CLASSPATH variable so that my java programs can access external jars. All the jars are in one directory and using the Java 1.6 wildcard feature, I currently have assigned the CLASSPATH variable to this value:
C:\Progr开发者_C百科am Files\Java\externaljars\*
Unfortunately, it doesn't seem to be working. Does anyone have any idea of what I am doing wrong?
I am running Windows 7.
Your classpath is bad. You haven't to use the *. If the directory of your external jars are in the C:\Program Files\Java\externaljars you have just to add this path to your classpath like that:
CLASSPATH = .;"C:\Program Files\Java\externaljars";
Try:
C:\Program Files\Java\externaljars\*
Assuming externaljars is the directory that has all the jar files.
精彩评论