Issue
Hello Stackoverflow Community!
I am facing a problem, when I want to execute my self-written JavaFX runnable Jar file program (it is a Chess game).
When I execute the program it needs about ten seconds to start. After the start, when I want to select a piece or the menu items there are two possible options:
- The Gui freezes completely after startup
- I may click on a piece and it needs around 5 sec. to select it and when I want to hover (no self-written event) on the JavaFX menubar, the PI freezes for about 5 sec. and then displays the blue hover color.
I have a Raspberry PI 3.
I have currently installed the Java Environment: ,,openjdk version "1.8.0_40-internal" ($ java -version
)
I added manually the JavaFX files (they are not included in this openjdk version) as it is mentioned at:Gluonhq -section 2.1.4
I run the Jar file with: java -jar Chess.jar
-> Chess.jar is jar file
The game runs without these errors on Linux Mint (openjdk version "1.8.0_131") and Windows 10.
I don´t know what is the source of the problem. Maybe JavaFX on the PI is simply not a good idea?
Anyway thanks for the help,
Alex
Solution
Thanks for your quick answers and suggestions, but today I found the solution:
@Joe C - with my next question I will specify the problem more clearly ;)
@sillyfly - no but thx. for your answer
@JosĂȘ - Yes I tried. The first program I used gave me the same bug, but today I tried another self-written one -> this one worked fine -> see below
The problem was that the PI couldn't render my Meeples (they were basically images). I found this out using the stack trace of the PI. Two days ago I couldn´t access the stack trace, due to an impossibility of exiting the game, now I developed an exit function, and here goes the stack trace. It showed me, that there is a null pointer at com.sun.prism.impl.BaseGraphics.drawTexture(BaseGraphics.java:4000)
- this is for rendering Images (as far as I know).
Today I removed my meeple images. I don´t know why the PI can´t render these images but it works fine now :)
-Alex
Answered By - Thinklex
Answer Checked By - Robin (JavaFixing Admin)