Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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
Marshal
Posts: 55681
162
  • 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
Marshal
Posts: 55681
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also found this link with installation instructions in.
 
Dave Tolls
Rancher
Posts: 2913
35
  • 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
Sheriff
Posts: 4073
112
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
Sheriff
Posts: 16027
87
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.
 
Omair Majid
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is one now.

To install everything, just run

 
Campbell Ritchie
Marshal
Posts: 55681
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I haven't needed to do that; I simply have always installed Sun/Oracle Java®.
 
Patrick Balleux
Greenhorn
Posts: 4
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the same thing on Ubuntu.  JRE will install but without OpenFX.

You just need to install the related package.

As a side note:  The OpenFX is a bit slower than the Oracle JavaFX.  I've made a few tests to compare them both and OpenFX is not quite there...

Have a great day|
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!