Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

there is no javafx packages in java 8 ! (Fedora Gnu/Linux)

 
Ali Zeynali
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there!
I just started to learn javaFX!
so I wrote a simple small test code and compile it :


And There is the result:

and this happen for all javaFX sub packages, I use openjdk 8
and when I type in terminal i get j
I checked /usr/lib/jvm-exports/ There was no jfxrt.jar so i made a Copy on this Directory but nothings changed!
In addition I have no problem with java Swing
 
Campbell Ritchie
Sheriff
Posts: 51407
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

As far as I can remember, JavFX is not included in the rt.jar file, so search your lib folder in the standard Java® installation folder for fx jar files. Add those files to your CLASSPATH. More details about CLASSPATH here.
By the way: I found this tutorial which might be helpful.
 
Campbell Ritchie
Sheriff
Posts: 51407
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also found this link with installation instructions in.
 
Dave Tolls
Ranch Hand
Posts: 2103
15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it's Open JDK is there a chance it needs to be the Open FX one?
I seem to recall reading some thread elsewhere talking about that a year or two ago.
 
Knute Snortum
Bartender
Pie
Posts: 2903
62
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JavaFX jar can be found here:

<JAVA_HOME>/lib/ext/jfxrt.jar

and it needs to be in the classpath option of the command.  I often set JAVA_HOME for this purpose.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15634
46
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave is right - JavaFX is not included in the Fedora Linux version of OpenJDK.

See this Fedora bug report: RFE: JavaFX

Probably the easiest way to get it to work is to download Oracle JDK instead of using OpenJDK, or otherwise there might be a way to build OpenJFX yourself but that will probably be a daunting task.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic