custom VM pack yields non-viable installer program?

50 views Asked by At

I was experimenting with the recipe for creating a custom VM pack, the motivation was to put our 3rd party libs in some "blessed" JRE distro's /lib/ext folder and zip it up as vm.zip (no compression, no paths) and then package that up with a properties file into another zip.

A VM file created that way shows up in the IA options for building, but the resulting installer.exe launches with a message that it could not find main class. The same project built with one of the vanilla JVM packs from IA works fine, so it must be something in the way I am creating my custom VM.

I also tried the File -> Create VM pack option from the UI, which likewise, gives me an error. Has anyone done this successfully, and if so, what zip tool did you use? (7z here..)

thanks for any insight!

enter image description here

1

There are 1 answers

0
Ivan Samoylov On

You can use ant to build vm pack.

<?xml version="1.0" encoding="UTF-8"?>
<project name="build_vm" default="default">
    <property name="buildTmpDir" value="Path_to_your_jre"/>
    <target name="default">
        <zip destfile="${buildTmpDir}/vm.zip"
            compress="false">
            <fileset dir="${buildTmpDir}/jre/"/>
        </zip>  
        <zip destfile="${buildTmpDir}/jre1.8.0.vm">
            <fileset dir="${buildTmpDir}/" includes="vm.zip"/>
            <fileset dir="${buildTmpDir}/" includes="vm.properties"/>
        </zip>
    </target>
</project>

Pay attention that ${buildTmpDir}/jre must contain bin and lib folders. The contents of vm.properties file have to look like this

vm.platform=windows 
vm.platform.flavor=win32 
vm.name=v1.8.0 Windows i386 
vm.exe.path=bin\\java.exe