由于对所需库的限制,课程上的访问限制 [英] Access restriction on class due to restriction on required library

查看:138
本文介绍了由于对所需库的限制,课程上的访问限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中收到此错误消息:

I get this error message in Eclipse:

Access restriction: The type DirectoryWalker is not accessible
due to restriction on required library 
/Library/Java/Extensions/commons-io-1.4.jar



这个其他SO问题在同一主题,但似乎不适用于这种情况。我没有创建一个新的java类,我试图使用一个。

what does this mean? There's this other SO question on the same topic but it doesn't seem to apply in this case. I'm not creating a new java class, I'm trying to use one.

推荐答案

在猜测另一个库,你是使用也需要Apache Commons I / O,但是不同的版本。拥有一段代码(转移)可以访问相同软件包的两个版本有点棘手。你可以安排它,所以你的代码和其他库使用相同的版本。使用CLASSPATH更容易! :)

At a guess another library you are using also requires Apache Commons I/O, but a different version. Having a piece of code (transitively) have access to two versions of the same packages is a little tricky. You can probably arrange it so your code and the other library use the same version. It's all much easier with CLASSPATH! :)

这篇关于由于对所需库的限制,课程上的访问限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆