But the run command I gave, ending in just “HelloFX”, is exactly what was shown at https://openjfx.io/openjfx-docs/#install-javafx.
What exactly is it that I’d have to enter instead? (I did try adding extension “.class” but that didn’t help.) > On 30 Oct2018, at 5:17 PM, Steve Hannah <st...@weblite.ca> wrote: > > The "java" command expects a fully-qualified class name, not a file path as > its argument. > > E.g. > cd /Users/me/Documents/java > java --module-path $PATH_TO_FX --add-modules=javafx.controls HelloFX > > > > On Tue, Oct 30, 2018 at 2:06 PM Murray Eisenberg <mur...@math.umass.edu > <mailto:mur...@math.umass.edu>> wrote: > This is under macOS Mojave (10.14). > > Following instructions at https://openjfx.io/openjfx-docs/#install-javafx > <https://openjfx.io/openjfx-docs/#install-javafx>, I compiled the sample > HelloFX.java via: > > javac --module-path $PATH_TO_FX --add-modules=javafx.controls > /Users/me/Documents/java/HelloFX.java > > But now if I attempt to run that... > > java --module-path $PATH_TO_FX --add-modules=javafx.controls > /Users/me/Documents/java/HelloFX > > ... I get error: > > Error: Could not find or load main class .Users.me.Documents.java.HelloFX > Caused by: java.lang.ClassNotFoundException: > /Users/me/Documents/java/HelloFX > > Yet the file reported as not found is there: > > ls -l /Users/me/Documents/java/HelloFX.class > -rwxr--r-- 1 me staff 1336 Oct 30 16:01 > /Users/murray/Documents/java/HelloFX.class > > (I had already changed permissions to add `u+x` in case that was the issue, > but apparently that was not the trouble. > > What's wrong? > > (Yes, `$PATH_TO_FX` does point to `javafx-sdk-11/lib`.) > > —— > Murray Eisenberg mur...@math.umass.edu > <mailto:mur...@math.umass.edu> > Mathematics & Statistics Dept. > University of Massachusetts Amherst > > > > > > > -- > Steve Hannah > Web Lite Solutions Corp. —— Murray Eisenberg mur...@math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 240 246-7240 (H) University of Massachusetts 710 North Pleasant Street Amherst, MA 01003-9305