1
votes

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:

  1. The Gui freezes completely after startup
  2. 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 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 help,

Alex

1
Welcome to Stack Overflow! Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example. - Joe C
Possibly related to this bug report - Itai
Have you tried running a recent Oracle JDK on your Pi? Have you run a regular JavaFX sample on your Pi, and if so, how it behaves? As already stated above, without code or stacktraces we can't really help. - José Pereda

1 Answers

0
votes

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 a other self written one -> this one worked fine -> see below

The problem was, that the PI could not render my Meeples (they were basically Images). I found this out using stack-trace of the PI. Two days ago I couldn´t access the stack trace, due to an impossibility of exiting the game, no I built in a Exit function and - Tada the stacktrace. It gave my a nullpointer at 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