I trying to use class Transliterator by using ICU library (ICU - International Components for Unicode). Import was successful and class files were saved in my Codeset but I can not use class Transliterator in java function rule. I founded in pega codeset had a little class same name in pricu2jdk.jar but didn’t have Transliterator class. Anyone had any solutions about this case.
@LATHAN(ラン) Try adding an Import package in the Imports and Exports tab in the function. In the tab, add the fully qualified package name and save the function again.
Also, you need to restart your PEGA servers after you have installed your new JAR. I hope you have done that.
You can see in error message run compile with com.pega.ibm.icu but my java code is com.ibm.icu
Error(s) detected while generating java. Compiler reported: ----------
1. ERROR in \com\pegarules\generated\test_complaintsprod_icu4j.java (at line 47)
import com.pega.ibm.icu.text.Transliterator;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import com.pega.ibm.icu.text.Transliterator cannot be resolved
----------
----------
2. ERROR in \com\pegarules\generated\test_Transliterator_010101__3620305168101550020.java (at line 47)
import com.pega.ibm.icu.text.Transliterator;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import com.pega.ibm.icu.text.Transliterator cannot be resolved
----------
3. ERROR in \com\pegarules\generated\test_Transliterator_010101__3620305168101550020.java (at line 89)
com.pega.ibm.icu.text.Transliterator t = com.pega.ibm.icu.text.Transliterator.getInstance("Fullwidth-Halfwidth");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
com.pega.ibm.icu.text.Transliterator cannot be resolved to a type
----------
4. ERROR in \com\pegarules\generated\test_Transliterator_010101__3620305168101550020.java (at line 89)
com.pega.ibm.icu.text.Transliterator t = com.pega.ibm.icu.text.Transliterator.getInstance("Fullwidth-Halfwidth");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
com.pega.ibm.icu.text.Transliterator cannot be resolved to a type
----------
4 problems (4 errors)
Compile failed.
Library—
The Library failed to compile
@KevinZheng_GCS could you kindly suggest the required steps , to pick the correct jar-file, we have imported jar, put in the /lib, still it is not recognizing it. The problem is that it does not have the required class file which is required for Japanese script translation. This class is required for Japanese half-width to full-width conversion.
Why in java file the last line code is com.pega.ibm.icu.text.Transliterator not is com.ibm.icu.text.Transliterator. Any one can explain me that and if can please help me to fix it?