[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Why cannot run compiled JavaFX 11 class?
From:       Murray Eisenberg <murray () math ! umass ! edu>
Date:       2018-10-30 22:20:01
Message-ID: 9F528220-7D90-4C07-AD8D-54595F5A2186 () math ! umass ! edu
[Download RAW message or body]

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 <steve@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 <murray@math.umass.edu \
> <mailto:murray@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                                murray@math.umass.edu \
> <mailto:murray@math.umass.edu> Mathematics & Statistics Dept.       
> University of Massachusetts Amherst              
> 
> 
> 
> 
> 
> 
> -- 
> Steve Hannah
> Web Lite Solutions Corp.

——
Murray Eisenberg                                murray@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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic