java - Using JavaFX with packages generates "Missing JavaFX application class" error -


i'm working on getting started javafx comes java 8 , i've run strange issue. when running default package, simple hello world application runs fine. however, when putting package, trying run program gives me following error:

missing javafx application class view/jfxhelloworld 

i've included normal helloworld.java file in view folder , works fine.

to clarify, file structure looks this:

jfx ----src --------view ------------helloworld.java ------------jfxhelloworld.java ----target --------view ------------helloworld.class ------------jfxhelloworld.class

where target folder putting compiled files following command:

javac -d target src/view/*.java

running normal helloworld.java file works fine:

java -cp target view/helloworld hello, world!

however, running javafx file causes problem classloader:

java -cp target view/jfxhelloworld missing javafx application class view/jfxhelloworld

googling led me 9 results, of source code javafx classloader.

both helloworld.java , jfxhelloworld.java declared in package view; - correct? appreciated.

my problem in command-line call run helloworld.

i should instead calling following:

java -cp target view.helloworld java -cp target view.jfxhelloworld 

for reason, allows run view/helloworld when shouldn't.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -