Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App won't open on OS X Mavericks #10

Closed
jahewson opened this issue May 7, 2014 · 9 comments
Closed

App won't open on OS X Mavericks #10

jahewson opened this issue May 7, 2014 · 9 comments

Comments

@jahewson
Copy link

jahewson commented May 7, 2014

I packed a simple "hello world" application for OS X and it runs on my development machine fine. However, on a machine with a fresh install of Mavericks, where there is no JVM, the app does not run, instead I get a dialog prompting me to install Java 6:

mavericks

Packr command was as follows:

java -jar packr-1.1-SNAPSHOT-jar-with-dependencies.jar
  -platform mac
  -jdk "openjdk-1.7.0-u45-unofficial-icedtea-2.4.3-macosx-x86_64-image.zip"
  -executable hello 
  -appjar gui.jar
  -mainclass "com/example/gui/HelloWorld"
  -minimizejre true
  -outdir out.app
@jahewson
Copy link
Author

jahewson commented May 7, 2014

I tried running the "hello" binary directly from the terminal (with "Contents" as the working directory), still no luck but I get the following output:

config file: /Users/john/Desktop/out.app/Contents/MacOS/config.json
jar: /Users/john/Desktop/out.app/Contents/MacOS/gui.jar
mainClass: com/example/gui/HelloWorld
No Java runtime present, requesting install.

Then I see the same dialog.

@badlogic
Copy link
Member

badlogic commented May 7, 2014

Can confirm, the joy of testing o the development system...

I think i'll have to rewrite the jvm so loading to us dl instead of rpaths.

Thanks for reporting!
On May 7, 2014 7:29 PM, "John Hewson" notifications@github.com wrote:

I tried running the "hello" binary directly from the terminal (with
"Contents" as the working directory), still no luck but I get the following
output:

config file: /Users/john/Desktop/out.app/Contents/MacOS/config.json
jar: /Users/john/Desktop/out.app/Contents/MacOS/gui.jar
mainClass: com/biblific/gui/HelloWorld
No Java runtime present, requesting install.

Then I see the same dialog.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-42457312
.

@badlogic
Copy link
Member

This should be fixed, please try the latest packr and let me know if that worked for you!

@jahewson
Copy link
Author

Unfortunately not, I tried it with fb8cac2 built from source and I'm still getting the same dialog.

@code-disaster
Copy link
Member

Maybe packr doesn't find your JVM archive? Be sure you are specifying an absolute path, or a relative path to the working directory for the "-jdk" parameter.

As a slightly related side note, as stbachmann and me are troubleshooting in the same area right now: when started with the openjdk-1.7.0-u40 JVM, OSX complains about X11 not been installed on my system. Seems this dependency was removed with u45.

@jahewson
Copy link
Author

The JDK is there in the output bundle, in Contents/MacOS/jre. I can confirm that Contents/MacOS/jre/lib/server/libjvm.dylib is being loaded, as if I remove from the bundle I get a segfault.

@dan-fitzgerald-av
Copy link

I'm still seeing this issue as well. My workaround was adding the "bin/java" file from openJDK to the package and writing a .command script to run "jre/bin/java -jar [app.jar]." Then in my info.plist I changed CFBundleExecutable to the name of that .command script. Pretty hacky! Unfortunately then my app gets an openJDK icon when run instead of the icon I provided.

@code-disaster
Copy link
Member

@dan-fitzgerald-av You might get your icon back adding "-Xdock:icon=/path/to/icon.png" to your command script.

I'm trying to resolve this right now by modifying packr for MacOS to do more or less the same you did with your script. I'll yet have to see how ugly it gets... :)

@ghost
Copy link

ghost commented Jul 31, 2014

I don't reproduce this bug. One of my testers is under Mac OS X 10.9.4, I put OpenJDK 1.7 update 65 into my application bundle.

karlsabo pushed a commit that referenced this issue Sep 9, 2020
Attempt to attach to the parent processes console, if that's successful then use it.

If '--console' is passed as an argument, then allocate a new console and use it.

GitHub fixes #10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants