I want to launch static function from jar file and recieve its return value during install time. Is there some other way, rather then executing java.exe?
I really fail to understand the reason for downvotes...
You can run custom code during the installation by extending from CustomCodeAction of InstallAnywhere. All you need to do is to override the install
and uninstall
methods of the base class. Please find the snippet of the sample code below.
public class MyCustomCodeAction extends CustomCodeAction {
public void install(InstallerProxy proxy) throws InstallException {
// call the static function of your jar here
}
public void uninstall(UninstallerProxy Uproxy) throws InstallException {
// you can do something here if you need (not must)
}
}
Good luck!