This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Running custom code
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2009
01:52 AM
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
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
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2009
03:51 AM
Try ip.setVariable("$HOSTNAME_TEST$", "localhost"); see if that works better.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2009
09:56 AM
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.
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.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)