I would appreciate if anyone 开发者_Go百科can help me with this
I am using install4j to create executable file, I need 2Gb of minimum space required , you can put this check ?.
I also want to check that machine should have 1.6X version of JDK installed, else I should terminate the installer. currently my installer is looking for JRE
thanks in advance
Sanjay
For the disk space check, add a "Run script" action to the "Startup" node of your installer and set its script to
if (SystemInfo.getFreeDiskSpace(context.getInstallationDirectory()) < 2000000000) {
Util.showErrorMessage("You need at least 2 GB of free memory");
return false;
}
return true;
Then, set the "Failure strategy" property of the action to "Quit on failure":
For the Java version check, go to General settings->Java version and set the minimum version to 1.6:
If the installer cannot find a 1.6 JRE with that minimum version, it will display a dialog with an appropriate message.
精彩评论