Currently using JDK 1.8 update 92 (32-bit). Why might ScenicView not be able to find my JavaFX application when launched from the jar, or as a -javaagent: parameter?
If I launch my JavaFX application, and then launch ScenicView from the jar file, it just sits there trying to find something to connect to. I have the -debug option set on the command line and all I get is this :-
Platform running
Launching ScenicView v8.0.0
Startup done
Creating server
Server done
Number of running Java applications found: 0
0 JavaFX applications found
I've tried starting ScenicView both as an "external tool" from IntelliJ (with the correct JVM specified), and just from the command line. Same result.
The -javaagent method does not seem to work either. If I add the jar as a -javaagent parameter to my application, as per the documentation, I just get this error on startup:
Exception in thread "scenic-view-boot" java.lang.IllegalStateException: Toolkit not initialized
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:273)
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:268)
at javafx.application.Platform.runLater(Platform.java:83)
at org.scenicview.ScenicView.lambda$premain$34(ScenicView.java:122)
at java.lang.Thread.run(Thread.java:745)
The only method of launching that works is to add the ScenicView jar to my application classpath and embed a launch into my application source like this
ScenicView.show(mainScene);
Which isn't as convenient as being able to just fire it up as a standalone tool when I need it.
This used to work perfectly. I can dig out some older JDK versions and see if it worked with an earlier jvm (update 77 exhibits exactly the same problem), but in the meantime, is there some way of getting more detailed logging out so I can try and find the problem?
It seems that it is bug in ScenicView startup in agent mode. I opened issue and propose PR to fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With