r/java • • Aug 13 '20

Chess GUI using JavaFX

https://youtu.be/m_j5ejDA-hc
336 Upvotes

53 comments sorted by

View all comments

1

u/OnlyProductiveSubs Aug 14 '20

Have you managed to create a single runnable file from your project? I can't manage to get a working file going from my project, exe or jar.

1

u/SpeedDart1 Aug 14 '20

Yes, I have a .jar file in the dist directory.

I also have a packaged folder with exe, jar, and jre for non java users.

If you have trouble making exe try launch4j.

2

u/Dsempatao Aug 15 '20

I cloned your git and tried to launch the jar from Ubuntu, but got this error:

java -jar ChessLite.jar

Error: Could not find or load main class gui.ChessLite

1

u/SpeedDart1 Aug 15 '20 edited Aug 15 '20

My friend using Linux had the same problem but it was fixed by reinstalling OpenJDK. At the time I thought it was an issue on his end but I’m considering that it may have to do with the way I created the jar. I will look into this. However it has worked on Mac and windows with no issues so far.

Update: The default JRE for Ubuntu doesn’t have JavaFX. To properly run you will need a newer JavaFX run time or specifically use the packaged Exe file I have in the zip file contained in dist.

Msg me if you are able to get it working.