cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
james_decosta
Level 9

hi i have a problem with the java version in the custom rules

hi,
i am writing some custom classes as given below and compiling them with jdk 1.5 which i use in evaluate custom rules action.
I have prepared my installer and when i tried to run it on jdk 1.4.2, then it is getting stuck near custom rule.

Is there anything wrong with the code:

package com.xxxxxxxx.roinstaller;

import com.zerog.ia.api.pub.CustomCodeRule;


public class ROSomeRule extends CustomCodeRule {

@Override
public boolean evaluateRule() {

String firstuserinput=ruleProxy.substitute("$IP_ADDRESS$");
String seconduserinput=ruleProxy.substitute("$USER_INPUT_RESULT_1$");
String thirduserinput=ruleProxy.substitute("$USER$");
String password=ruleProxy.substitute("$PASSWORD$");
String dbtobeUsed=ruleProxy.substitute("$DB_TO_BE_USED$");
String driver=ruleProxy.substitute("$DRIVER$");

String tobeused="SET";
String valueToRefer=ruleProxy.substitute("$NULL$");
String choseninstallset=ruleProxy.substitute("$CHOSEN_INSTALL_SET$");
System.out.println("in the install method of rocustomcode action55555555555555555555555555555555555555555");
/*if((choseninstallset.equalsIgnoreCase("Typical")) && (firstuserinput.equalsIgnoreCase(valueToRefer)||seconduserinput.equalsIgnoreCase(valueToRefer)||thirduserinput.equalsIgnoreCase(valueToRefer)))
{
ip.setVariable("$SOME_VARIABLE$", tobeused);
}*/
if(choseninstallset.equalsIgnoreCase("Typical")){
System.out.println("entered the typical flow of install method succesfully 9999999999999999999999999");
if(firstuserinput.equalsIgnoreCase(valueToRefer)||seconduserinput.equalsIgnoreCase(valueToRefer)||thirduserinput.equalsIgnoreCase(valueToRefer)||password.equalsIgnoreCase(valueToRefer)||dbtobeUsed.equalsIgnoreCase(valueToRefer)||driver.equalsIgnoreCase(valueToRefer)){
return true;
}
else{
System.out.println("inside the inner flow of the if statement");
return false;
}
}
else{
System.out.println("inside trhe outer loop of the if else statement in the code let me see if i can do it thorugh some way");
return false;
}



}


}
I am allowing to continue only if the user enters all the fields and even the label settings are not appearing properly when the installer panels come up

.
Any sort of suggestion is eagerly awaited.
James
Labels (1)
0 Kudos
(1) Reply
Yves_Kreis
Level 7

Generally you can't run code compiled by 1.5 on a 1.4 JRE. If you wish to do so, you need to use -target while compiling.

Best Regards,
Yves
0 Kudos