Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ScenicView 8.6.0 not finding JavaFX application

Tags:

java

javafx-8

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?

like image 286
David Avatar asked Oct 31 '22 05:10

David


1 Answers

It seems that it is bug in ScenicView startup in agent mode. I opened issue and propose PR to fix it.

like image 164
Nikolay Artamonov Avatar answered Nov 15 '22 06:11

Nikolay Artamonov