Hello,
I want to initialize a context value with the current date minus one month. (This context velue is then send to a child job)
I'm a beginner under JAVA so I try in a tJavaFlex the code :
Calendar cal = Calendar.getInstance();
context.setProperty("sdhm",routines.TalendDate.formatDate("yyyyMM",Cal.add (Cal.MONTH, -1)));
There's compilation errors :
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Calendar cannot be resolved to a type
Calendar cannot be resolved
Cal cannot be resolved
Cal cannot be resolved
at testoracle7.jobmaitre.jobmaitre.tJavaFlex_1Process(jobmaitre.java:141)
at testoracle7.jobmaitre.jobmaitre.runJob(jobmaitre.java:297)
at testoracle7.jobmaitre.jobmaitre.main(jobmaitre.java:244)
I try then to include this line :
import java.util.Calendar;
but new errors:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token "import", assert expected
java.util.Calendar cannot be resolved
Calendar cannot be resolved to a type
Calendar cannot be resolved
Cal cannot be resolved
Cal cannot be resolved
at testoracle7.jobmaitre.jobmaitre.tJavaFlex_1Process(jobmaitre.java:142)
at testoracle7.jobmaitre.jobmaitre.runJob(jobmaitre.java:304)
at testoracle7.jobmaitre.jobmaitre.main(jobmaitre.java:248)
Could you help me please
Gilles