-
Notifications
You must be signed in to change notification settings - Fork 282
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
Apple AWT Issue #21
Comments
Well actually, I think I'm dumb.. the error message clearly says I shouldn't add the startOnFirstThread :) " Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line However, I only know how to add parameters, not how to remove them, hm.. so I'm still stuck |
The problem is with CGraphicsEnvironment Running this: No idea how to further debug |
@mgc found a solution to this one: process.env['JAVA_STARTED_ON_FIRST_THREAD_' + process.pid] = '1' added before any instantiations worked like a charm for me. |
When running in a vanilla node environment on macOS, Java cannot be loaded from the application's main thread. And I guess javascript typically runs single threaded, so we cannot simply defer the loading. One workaround is to use headless mode. See joeferner/node-java#21. Another is to use Electron, where it appears the threading is different.
I think it is time I close this 6 years old issue :) |
Hi,
I have some issues when running a library (Sikuli) on Mac:
I tried to do:
but it didn't work:
I also tried -Djava.awt.headless=true, without much success:
Any ideas?
thanks!
The text was updated successfully, but these errors were encountered: