> why I need to set the fxclass access specifier to public to make the code work?
The java launcher that executes your application is not in the same java package as your application, so unless you assign the public access rights for your application, the launcher cannot find your application because the application is invisible to it - if the launcher can't find the application, the application cannot be run.
> Can anyone point me out where in the error is says I need to set the class public.
It doesn't explicitly say that, but that is not uncommon for error messages - often they will give you an indication of what went wrong rather than telling you exactly what is wrong. In this case the indication is the NoSuchMethodException on a reflective application constructor call. It is telling you that the Java launcher is looking for a constructor for the class and cannot find it. As the public/private/package/protected keywords in Java are information hiding constructs for modifying visibility scope, I think it would naturally lead you to check the visibility scope you have given your application.
When you call launch() on a JavaFX application, some strange things happen due to the quirky way the launching code is implemented using reflection.
> Doesn't that mean it also has to have a public no‑arguments constructor, too? (Or if not public, accessible via reflection.)
The following simple hello world program will generate an exception unless you comment out the private constructor to allow the default public no-arg constructor to be used when launching the application instance.
The exception generated would be "Caused by: java.lang.NoSuchMethodException: PrivateHelloWorldApp.<init>()".