Get OpenJDK to work with Packr

451 Views Asked by At

Using the JSON config, I specify an opendjk prebuild, containing a JRE. (The exact one specified in packr's example in the readme, actually)

It packs my JAR into a mac executable successfully.

I run the executable, and it works as expected on my Yosemite (where I also have Oracle JDK installed)

When I run the executable on another mac with Yosemite (which does not have any JDK installed), it throws java/lang/NoClassDefFoundError: java/lang/Object

But it should use the JRE specified and packed with the executable by packr. It Should not depend on the system to have a JDK installed.

EDIT: Added config.json code -

{
    "platform": "mac",
    "jdk": "/Users/absolute/path/to/jdk/openjdk-1.7.0-u45-unofficial-icedtea-2.4.3-macosx-x86_64-image.zip",
    "executable": "myApp",
    "appjar": "/Users/absolute/path/to/jar/MyJar.jar",
    "mainclass": "self/edu/Main",
    "vmargs": [
       "-Xmx256M"
    ],
    "resources": [

    ],
    "minimizejre": "soft",
    "outdir": "out-mac"
}
0

There are 0 best solutions below