phoenix_ml
Level 3

Running custom code

Hi,

I am trying to run some simple custom code but it is not working.

I set the variable HOSTNAME_TEST using
ip.setVariable("HOSTNAME_TEST", "localhost");

It is hardcoded for this testing purpose.

In the installanywhere project i call custom code specifying the jar to this class as well as specifying the class name customAction

I then display the variable $HOSTNAME_TEST$ but it displays blank.

Am I missing anything here?

btw the code compiles with no errors and i am using the sample CustomCodeAction file as a template.

Thanks in advance
Labels (1)
0 Kudos
2 Replies
pv7721
Level 20

Try ip.setVariable("$HOSTNAME_TEST$", "localhost"); see if that works better.
0 Kudos
purcellk24
Level 7

Is the custom code being invoked correctly? Check the path to the class and the jar file. I have see numerous times that even the customcode action being called is incorrect. For example, the action in IA is "Execute CustomCode" while a Custom Panel is what the user really wanted.

To help you out, run your installer in debug mode and put a System.out.println in your custom code and see if the line gets printed.
0 Kudos