How to enable JavaFX??

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :)

Moderator: Moderators

Post Reply
chiefcw
Baby Hen
Posts: 2
Joined: Fri Dec 14, 2018 11:59

How to enable JavaFX??

Post by chiefcw » Fri Dec 14, 2018 16:38

I'm new, very new to Sabayon so please be easy. I'm trying to get ThinkorSwim to run, the installer runs but errors out saying I need JavaFx. I've installed Oracle Java have set it as the default Java, but still get the error. When I re-install thru Rigo I see the message that the javafx flag is disabled. How do I enable the flag and get javafx installed? Any help is appreciated, thanks.

Image

User avatar
sabayonino
Sagely Hen
Posts: 3342
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: How to enable JavaFX??

Post by sabayonino » Fri Dec 14, 2018 17:17

javafx flag is disabled server side

Code: Select all

dev-java/oracle-jre-bin
     Available versions:  
     (1.8)  1.8.0.181^fs 1.8.0.192^fs
     (9)    (~)9.0.4-r1^fs
       {alsa commercial cups +fontconfig +gentoo-vm gtk2 gtk3 headless-awt javafx jce nsplugin selinux}
     Installed versions:  1.8.0.162-r1(1.8)^fs(21:34:37 07/04/2018)(alsa cups fontconfig -commercial -headless-awt -javafx -jce -nsplugin -selinux)
     Homepage:            http://www.oracle.com/technetwork/java/javase/
     Description:         Oracle's Java SE Runtime Environment
If you need of this features please file a bug request or ignore the message

chiefcw
Baby Hen
Posts: 2
Joined: Fri Dec 14, 2018 11:59

Re: How to enable JavaFX??

Post by chiefcw » Tue Dec 18, 2018 11:46

I manually installed Oracle Java and have the program running now. I did have to uninstall icedTea for it to work. Thanks

Stupot
Sagely Hen
Posts: 1721
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: How to enable JavaFX??

Post by Stupot » Sun Dec 23, 2018 23:10

@chiefcw, you probably didn't actually have to uninstall icedTea for it to work, rather you just needed to switch which jvm your user/system used by default. There's a little utility called java-config-2 that you can install that makes this super simple.

Just fyi. What you've done clearly works for you, I just wanted to share extra info that might be handy for anyone coming later.

Code: Select all

[email protected] ~ $ java-config-2 -L
The following VMs are available for generation-2:
*)      IcedTea JDK 3.9.0 [icedtea-bin-8]
2)      Oracle JDK 1.8.0.162 [oracle-jdk-bin-1.8]
You can see I have them both, but currently have IcedTea as the default. I've switched back and forth a number of times in the past.

There's also eselect java-vm, which I believe they both ultimately do the same thing.

Code: Select all

[email protected] ~ $ eselect java-vm --list
Available Java Virtual Machines:
  [1]   icedtea-bin-8  user-vm
  [2]   oracle-jdk-bin-1.8  system-vm

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8188
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: How to enable JavaFX??

Post by Fitzcarraldo » Fri Jan 18, 2019 19:51

Better to use 'eselect java-vm' rather than 'java-config' or 'java-config-2', as the latter two are deprecated:

Code: Select all

java-config --help
[snip]
Deprecated:
Use eselect java-vm instead. Report usability issues so they can be
taken care of.
[/snip]

svantoviit
Old Dear Hen
Posts: 739
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: How to enable JavaFX??

Post by svantoviit » Sun Jan 27, 2019 12:00

chiefcw wrote:
Tue Dec 18, 2018 11:46
I manually installed Oracle Java...
Better to stick with a package manger. You could have installed it via Portage with javafx USE flag enabled and mask it in Entropy.

To make the USE flag permanent, create a file called f.ex. /etc/portage/package.use/03-local.package.use with the following content:

Code: Select all

dev-java/oracle-jdk-bin javafx
Then install

Code: Select all

# emerge --sync
# emerge -a oracle-jdk-bin:1.8
It's fetch restricted, this means, you have to download the sources on your own. Portage will give you the instructions.
When download from the Oracle site, put the package into /usr/portage/distfiles and change owner to portage.

Code: Select all

# mv jdk-8u202-linux-x64.tar.gz /usr/portage/distfiles/
# cd /usr/portage/distfiles/
# chown portage:portage jdk-8u202-linux-x64.tar.gz
Then run the install again:

Code: Select all

emerge -a oracle-jdk-bin:1.8
If successful, register and mask in Entopy:

Code: Select all

# equo rescue spmsync
# equo mask --ask oracle-jdk-bin:1.8

Post Reply