Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
i would like pass data from tJava into tMap, is ther anybody who knows how to do it ? Please
My tJava code look like that :
package routines;
import java.io.*;
import java.util.Arrays;
public class ClearCodeFab {
//RETOURNE UN STRING CONCATENE
public static String clear(String csvFile) throws IOException {
String splitBy = ";";
String line="";
String result=null;
BufferedReader br = new BufferedReader(new FileReader(csvFile));
while ((line = br.readLine())!=null){
String[] tabFab = line.split(splitBy);
String codeFab=tabFab[4];
if (tabFab[5]!=null) {
String nomFab=tabFab[5].replaceAll(" [(][A-Z][A-Z][A-Z][0-9][0-9][)]|[(][A-Z][A-Z][A-Z][A-Z][0-9][0-9][)]|[(] [A-Z][A-Z][A-Z][0-9][0-9][)]|[(][(][A-Z][A-Z][A-Z][0-9][0-9][)]|[(][A-Z][A-Z][0-9][0-9][0-9][)]|[\\[][A-Z][A-Z][A-Z][0-9][0-9][)]|[(][A-Z][A-Z][A-Z][0-9][0-9][\\]]", "");
//for(int i=0; i<tabFab.length; i++) {
result += codeFab.substring(1, 6)+";"+nomFab+"\n";
//}
}
}
return result;
}
}
I tried with Array of String in return but it didn't work too.
My job structure :
My error message :
Exécution en erreur :Erreurs de compilation du Job
Au moins le Job "recupCodeFabricantBac" a des erreurs de compilation, réparez et réexportez.
Ligne en erreur: 794
Message détaillé: Type mismatch: cannot convert from String[] to String
Il peut y avoir d'autres erreurs causées par la compatibilité avec la JVM. Vérifiez que les paramètres de votre JVM sont les mêmes que dans le studio.
Job recupCodeFabricantBac terminé à 17:18 29/09/2020. [Code sortie=0]
My tMap structure :
Thanks in advance.
Thanks Papaki,
i'll try and i'll tell you.