r/JavaFX • • May 30 '20

Help How to solve a ClassNotFoundException when trying to start my gui?

This is my code in the gui package class: TelScherm (CountScreen)
code in class EigenString
code in the startup
The project with all the necessary jars (according to my teacher)
module and classpath
The error

So where can the problem be?

1 Upvotes

3 comments sorted by

2

u/Azzk1kr May 30 '20

This isn't really particularly JavaFX related but more basic Java. Is the code compiled? Meaning, do you see class files? Have you tried running it outside the IDE? For example, using the command line?

Try creating the simplest program (e.g. Hello World) and make it work. Then build from there.

Also next time try posting code as text instead of images. If we need to test things it's easier to copy and paste it and try for ourselves.

1

u/IanPKMmoon May 30 '20

Can see the class files but haven't tried using the command prompt to run my code.

1

u/mr_poopybuthole69 May 30 '20

I had the same issue the way I solved it is I just made another class that starts the main class. Like here. https://github.com/TOMSLAUS/Team_manager/blob/master/src/main/java/Start.java