最常使用的一些Java開源類庫

jopen 11年前發布 | 23K 次閱讀 Java Java開發

一個典型的Java項目都會有依賴于第三方庫。本文為各種不同的應用總結了最流行和廣泛使用的Java庫。其中一些還提供了一個簡單的例子。

 

1. Core

Google Guava – Google’s Core library for collections, caching, primitives support, etc. (example)
Apache Commons Lang – Apache’s library that provides a host of helper utilities for the java.lang API, such as String manipulation, object creation, etc.

2. HTML, XML Parser

Jsoup – a convenient library to manipulate HTML. (example)
STaX – Process XML code. (example)

3. Web Frameworks

Struts 2 – most popular web framework from Apache. (example)
Spring – an open source application framework and inversion of control container for the Java platform. (example)
Google Web Toolkit – a development toolkit from Google for building and optimizing complex browser-based applications. (example)
Strips – a presentation framework for building web applications using the latest Java technologies.
Tapestry – component oriented framework for creating dynamic, robust, highly scalable web applications in Java.

Here is a comparison of those frameworks.

4. Office-Complicant

Apache POI – APIs for manipulating various file formats based upon Microsoft’s OLE 2 Compound Document format using pure Java.
Docx4j – a Java library for creating and manipulating Microsoft Open XML (Word docx, Powerpoint pptx, and Excel xlsx) files.

5. Windowing Libraries

Swing – a GUI library from SDK. (example)
SWT – a GUI library from eclipse.
SWT vs. Swing

6. GUI Frameworks

Eclipse RCP. (example)

7. Natural Language Processing

OpenNLP – a library from Apache. (example)
Stanford Parser – a library from Stanford University. (example)

If you are an expert of NLP, here are more tools.

8. Static Analysis

Eclipse JDT – a library from IBM which can manipulate Java source code. (example)
WALA – a library that can process .jar file, i.e., bytecode. (example)

9. JSON

Google Gson – a Java library that can be used to convert Java Objects into their JSON representation. (example)
JSON-lib – a java library for transforming beans, maps, collections, java arrays and XML to JSON and back again to beans and DynaBeans.

10. Math

Apache Commons Math – provide functions for math and statistics.

11. Logging

Apache Log4j – most popular logging library. (example)
Logback – a successor to the popular log4j project.

12. Chart, Report, Graph

JFreeChart – creates charts such as bar charts, line charts, pie charts, etc.
JFreeReport – creates PDF reports.
JGraphT – create graph that contains a set of nodes connected by edges.

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!