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!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top