[英]How to use org.apache.commons.lang namespace in Java?
I tried in Eclipse to use org.apache.commons.lang.NotImplementedException
, though it seems from what I can see both from IntelliSense and the Package Explorer , that that namespace does not exist. 我在Eclipse中尝试使用org.apache.commons.lang.NotImplementedException
,虽然从IntelliSense和Package Explorer中可以看出,该命名空间不存在。
So I guess I must load some other package(do you call them libraries in java?) than those it loaded by default. 所以我想我必须加载一些其他包(你在java中称它们为库?),而不是默认加载的那些包。
This is my current setup: ( link dead ) 这是我目前的设置:( 链接死机 )
Download the commons lang library and add it to your eclipse project library. 下载commons lang库并将其添加到您的eclipse项目库中。
EDIT (2016/02) : it seems that nowadays the .jar files are not provided as is. 编辑(2016/02):现在似乎没有按原样提供.jar文件。 You have to get the "binary" archive (eg "commons-lang3-3.4-bin.zip") from the same download page and extract it. 您必须从同一下载页面获取“二进制”存档(例如“commons-lang3-3.4-bin.zip”)并将其解压缩。 The required jar files are inside the extracted folder. 所需的jar文件位于解压缩的文件夹中。
To add the jar to your eclipse project library: 要将jar添加到eclipse项目库:
You need to add Apache commons jar file to the project. 您需要将Apache commons jar文件添加到项目中。 You can select the jar you want from here - http://commons.apache.org/downloads/index.html 您可以从这里选择所需的jar - http://commons.apache.org/downloads/index.html
for lang you need this - commons-lang-2.5.jar 对于lang你需要这个 - commons-lang-2.5.jar
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.