Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
697 views
in Technique[技术] by (71.8m points)

eclipse - 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.

So I guess I must load some other package(do you call them libraries in java?) than those it loaded by default.

This is my current setup: (link dead)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Download the commons lang library and add it to your eclipse project library.

EDIT (2016/02) : it seems that nowadays the .jar files are not provided as is. You have to get the "binary" archive (e.g. "commons-lang3-3.4-bin.zip") from the same download page and extract it. The required jar files are inside the extracted folder.

To add the jar to your eclipse project library:

  1. open project properties
  2. choose Java Build Path
  3. tab to Libraries
  4. add jars (if the jar is inside your project folder)
  5. add external jar (if the jar is outside your project folder)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...