Comments (8)
https://github.com/libgdx/packr/blob/master/src/main/native/packr/src/packr.cpp#L561
I don't know C++, but I'd assume this is around where the issue is, as it terminates when the main method closes and not when all non-daemon threads are dead. This, however, doesn't explain the line directly after invoking launch
not running.
from packr.
I never used JavaFX, but the Application class does a lot of reflection work. Maybe try to try {} catch {} everything and see if there's an unhandled exception slipping through.
Also, I believe a call to System.exit() causes the main() to not return properly as well.
from packr.
It's throwing a ClassNotFoundException
over the DesktopLauncher
class.
Which doesn't make sense, since the main
method lives inside that class; it shouldn't even need to ask for it. The program otherwise works perfectly fine outside of packr's executable, making it to the game's launcher window.
Invoking static me.scarlet.undertailor.desktop.DesktopLauncher.main() function ...
test0test1
java.lang.RuntimeException: java.lang.ClassNotFoundException: me.scarlet.undertailor.desktop.DesktopLauncher
at javafx.application.Application.launch(Application.java:260)
at me.scarlet.undertailor.DesktopLauncher.main(DesktopLauncher.java:78)
Caused by: java.lang.ClassNotFoundException: me.scarlet.undertailor.desktop.DesktopLauncher
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at javafx.application.Application.launch(Application.java:248)
... 1 more
test2
Destroyed Java VM ...
Press ENTER key to exit.
Other weird behavior is that it doesn't print out the exception if I redirected output to a text file.
from packr.
@code-disaster It's still very odd that this occurs, luckily the launch
method has alternate parameters where I can specify the DesktopLauncher class. I'll leave this issue open as this seems to be local to packr
only.
// fix
Application.launch(DesktopLauncher.class, args);
from packr.
@code-disaster The same issue still occurs in version 2.0 even with the fix that @Xemiru mentioned.
public static void main(String[] args) {
System.out.println("hello world 1");
try {
Application.launch(JavaFXApp.class, args);
System.out.println("hello world 2");
} catch (Exception ex) {
ex.printStackTrace();
}
System.out.println("hello world 3");
}
Only `hello world 1` gets outputted and the application just exits.
No exceptions occur either.
from packr.
I have too faced the same issue as mentioned by the others when distributing an app that uses Java FX.
To get around this issue, I created a bash script that unzips the JDK and puts the JRE in a specific folder.
As a workaround to start the app I created a: .command, .bat, .sh - it is not pretty but it works.
@code-disaster - A suggestion would be to have a minimizeJre='skip' and distribute the JRE in full.
from packr.
@guikeller if you omit the minimizeJre
parameter, minimize is skipped. Also, this seems like a different issue, since @Xemiru wrote that he tried with a unminified Oracle JRE.
from packr.
Please try the latest version of packr and open a new issue if there is a problem.
Thanks.
from packr.
Related Issues (20)
- github action support HOT 3
- please help me HOT 1
- Splash screen in Packr on macOS HOT 7
- XstartOnFirstThread hangs forever on OSX HOT 1
- LWJGL3 crashes on OSX HOT 4
- Packr cannot recognise `jrePath` Temurin JRE and JDK zips for Windows HOT 8
- Load configuration file relative to executable location, not working directory HOT 1
- Can you create Linux binary that makes use of installed Java on Linux instead of packaging one with packr?
- How to make generated app to use current working dir as its working dir instead of app's dir?
- FEATURE REQUEST HOT 1
- Consulting: Complicated packaging methods
- Packing with Oracle JDK causes error HOT 2
- Mac keeps throwing permission denied HOT 1
- Error 503 from https://artifactory.nimblygames.com while building HOT 1
- Version 4.0.0 missing from artifactory HOT 2
- Error when execute .exe file
- classpath is empty when retrieving it.
- Frame blurry when starting with bundled launcher
- Can you add an option to remove the previous out directory if it exists?
- Generated .exe does nothing HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packr.