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

Mac non executable app / cannot launch #94

Closed
mtsamis opened this issue Feb 14, 2017 · 11 comments
Closed

Mac non executable app / cannot launch #94

mtsamis opened this issue Feb 14, 2017 · 11 comments

Comments

@mtsamis
Copy link

mtsamis commented Feb 14, 2017

Hallo,

I'm using packr to pack a jar for osx but can't get it working. Im using the equivalent config with win/linux which work but the resulting osx program isn't working. I tried with a minimal java program (no dependancies etc) and it still didnt work. When i manually launch the executable in Contents/MacOS/ i get up a terminal which goes until "Invoking static mainPackage.AppMain.main() function..." and then nothing happens, it stops there and i can only force terminate the program. (if I add .app extension to the Contents folder and then launch the MacOS/ executable i get "Error: failed to load configuration: config.json"). Otherwise for win/linux packr performed great and is a really handy and flexible packaging tool.

Any help is deeply appreciated, thanks

Macbook air - version 10.10.5

@jupjohn
Copy link

jupjohn commented Mar 5, 2017

I'm also suffering from this issue. I'm running Sierra 10.12.3 so I thought it might've been just that release, but nice to know that it's not I guess. This is a pain in the ass for those wanting to distribute to OS X so I think it should be a high priority if this project is even still active.

@code-disaster
Copy link
Member

code-disaster commented Mar 6, 2017

Without more information, my best guess is to try a different JVM. For example, right now we use a Azul Zulu JVM with deployments of our Java 8 game in development, and it's working pretty well so far. (but has a minimum requirement of OS X 10.9)

(if I add .app extension to the Contents folder and then launch the MacOS/ executable i get "Error: failed to load configuration: config.json")

Small note: the .app extension is supposed to be added to the root folder, the one above Contents/.

@anubitum
Copy link

I had the same problem.

After trying different JVM (different version JDK, Zulu), I tried removing the VM arguments ("Xmx1G" and "XstartOnFirstThread") and it worked. Try to play with config.json "vmArgs", directly into .app package to see if it works for you too.

@yhslai
Copy link

yhslai commented Apr 16, 2017

I got the same issue. Removing XstartOnFirstThread fixed it, but it makes Packr unusable for LWJGL3 based app.

@sco-tt
Copy link

sco-tt commented Feb 6, 2018

Just wanted to add that switching to the Zulu JVM solved this for me.

@neomatrix369
Copy link

neomatrix369 commented Dec 5, 2018

I'm trying this out now, will keep the thread posted of my own experience. Built packr version 2.1

@neomatrix369
Copy link

neomatrix369 commented Dec 5, 2018

I removed the vm args flag and switched to Zulu MacOS JDK 1.8 (8u192) but it still does the same, hangs and does nothing:

➜ $ ./record_screen_and_upload.sh   
record folder already exists, proceeding
INFO  [main]       - Starting recording app

On other OSes, the app already starts running.

@neomatrix369
Copy link

I ran it with the -verbose option:

[snipped]
[Loaded javax.management.InstanceNotFoundException from /path/to/Contents/Resources/jre/lib/rt.jar]
[Loaded javax.management.MBeanServerFactory from /path/to/Contents/Resources/jre/lib/rt.jar]
[Loaded java.lang.management.ManagementFactory from /path/to/Contents/Resources/jre/lib/rt.jar]
[Loaded java.util.IdentityHashMap$KeySet from /path/to/Contents/Resources/jre/lib/rt.jar]
[Loaded java.util.IdentityHashMap$IdentityHashMapIterator from /path/to/Contents/Resources/jre/lib/rt.jar]
[Loaded java.util.IdentityHashMap$KeyIterator from /path/to/Contents/Resources/jre/lib/rt.jar]

@code-disaster
Copy link
Member

I doubt that "Java Management Extensions" is shipped as part of the Zulu JDK.

@neomatrix369
Copy link

I have fixed the issue, it was something silly on my part - I used the minimiseJre option and it would strip off things that were needed during execution, removing that option the issue was fixed.

Let me try again from scratch and see what happens.

@neomatrix369
Copy link

I works now from scratch - so its missing JDK/JRE dependencies which causes it to freeze. Its now all sorted for me.

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

8 participants