Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Commons Lang 2 vs 3

In my application I'm using apache commons Lang v.3. A requried library give my a

java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtils 

Is there a build translation between commmon.lang to commons.lang3 or I have to add both lang libraries?

like image 967
Tobia Avatar asked Jun 11 '14 09:06

Tobia


People also ask

What is Apache Commons Lang for?

Apache Commons Lang provides a host of helper utilities for the java. lang API, notably String manipulation methods, basic numerical methods, object reflection, concurrency, creation and serialization and System properties. Additionally it contains basic enhancements to java. util.

What is common lang3?

The Apache Commons Lang 3 library is a popular, full-featured package of utility classes, aimed at extending the functionality of the Java API.

What is Apache Commons library?

Apache Commons Text is a library focused on algorithms working on strings. 2020-07-21. Validator. Framework to define validators and validation rules in an xml file.

What does Stringescapeutils escapeSql do?

escapeSql. Escapes the characters in a String to be suitable to pass to an SQL query. For example, statement.


1 Answers

You can have both Lang2 and Lang3 in your classpath. Due to incompatibility of Lang2 and Lang3, the package is intentionally changed from com.apache.commons.lang to com.apache.commons.lang3 so that you can have both version in classpath without conflict

like image 98
Adrian Shum Avatar answered Sep 28 '22 15:09

Adrian Shum