开发者

How to set the system environment CLASSPATH variable in Windows 7

开发者 https://www.devze.com 2022-12-21 20:54 出处:网络
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 CLA

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消