开发者

How to set the system environment CLASSPATH variable in Windows 7

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜