Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use org.apache.commons in GWT?

Tags:

gwt

I am using GWT 2.5.0. I want to use some methods in org.apache.commons. GWT want source code also for adding external jar. So I downloaded source and class files and merge both in jar. It is not giving any error for some methods but some classes of org.apache refering other class outside this package. So it gives the following error

[ERROR] [rmchecking] - Errors in 'org/apache/commons/lang/StringUtils.java'
[ERROR] [rmchecking] - Line 237: The method isWhitespace(char) is undefined for the type Character

Is there any package in gwt that giving same facility of this org.apache.commons? or how to use this same package in gwt?

like image 698
Parvathy Avatar asked Dec 01 '22 22:12

Parvathy


1 Answers

You cannot use any third party jar that is not GWT compatible. Example apache-commons.

HINT - They do not have .gwt.xml file telling GWT compiler that they have GWT compatible code.

You can however fork it and make it your own gwt compatible lib from the apache common. Example - http://code.google.com/p/gwt-commons-lang/

like image 111
appbootup Avatar answered Dec 06 '22 07:12

appbootup