1

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"
}
Dingredient
  • 2,191
  • 22
  • 47
  • I'm voting to close this question as off-topic because I don't see what anyone here can do to help you, appears to be something to take up with your vendor. – Brian Knoblauch Jun 12 '15 at 15:48
  • 2
    Brian, openjdk DOES work with Packr - if you do it right. I'm doing something wrong... What anyone here can do to help me, is help me to find out what I'm doing wrong. – Dingredient Jun 12 '15 at 15:50
  • @PatMeeker you could perhaps show part of your config.json? specifically the part of the openjdk prebuild – Daemedeor Jun 15 '15 at 20:29
  • @Daemedeor - added JSON (had to replace identifying info with dummy values though...) – Dingredient Jun 16 '15 at 18:08
  • @PatMeeker why aren't you pointing to a URL online? If they don't have a JDK or moved the location, your Packr installation will break. But you'll either have to prompt them or something i mean, it looks like your JAR requires the JDK to run... not much more you can do – Daemedeor Jun 16 '15 at 20:28
  • @Daemedeor - as I understand packr's documentation, when I download the JDK .zip from openJDK and include that, packr should create an executable with both the JRE and JDK all self-contained within the executable. – Dingredient Jun 16 '15 at 20:49
  • doesn't look that way to me see: a URL or local file location to an OpenJDK build for the platform you want to build – Daemedeor Jun 16 '15 at 21:09
  • that is if your app requires a JDK to in the first place. if you just need the JRE, packr from the looks of it, will cut down the JRE – Daemedeor Jun 16 '15 at 21:11
  • @Daemedeor - yes exactly, of those 2 options: "a URL or local file" - I'm trying to do the "local file" option. I think my app does require a JDK, I mean it's not finding java/lang/Object, so... it must. – Dingredient Jun 16 '15 at 22:30
  • @PatMeeker but it won't pull your local file thats the thing.. it'll try to pull x person's (since you're looking in the /User folder) – Daemedeor Jun 16 '15 at 22:32
  • Please can you check the path of JDK once... – Jaffer Wilson Jun 18 '15 at 05:39

0 Answers0