I'm actually trying to follow a JavaFX tutorial and when i got my Main app running to have an preview it shows me this Warning on console :
Feb 24, 2017 12:55:20 PM javafx.fxml.FXMLLoader$ValueElement processValue
WARNING: Loading FXML document with JavaFX API of version 8.0.111 by JavaFX runtime of version 8.0.60
Feb 24, 2017 12:55:20 PM javafx.fxml.FXMLLoader$ValueElement processValue
WARNING: Loading FXML document with JavaFX API of version 8.0.111 by JavaFX runtime of version 8.0.60
i searched a bit and it seems i have different versions of JDK/JRE or something like that, here is the output from this code i found on this topic :
System.out.println("java version: "+System.getProperty("java.version"));
System.out.println("javafx.version: " + System.getProperty("javafx.version"));
OUTPUT :
java version: 1.8.0_121
javafx.version: 8.0.60
OUTPUT from java -version command :
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
i went to this location : /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java and found 2 folders "java-1.8.0-openjdk-amd64" and "java-8-openjdk-amd64" (both have the same size) so maybe these are the 2 versions confliction? what should i do to resolve the problem?
The "alternative" command doesn't work for me, it shows me this error:
No command 'alternatives' found, did you mean:
Command 'galternatives' from package 'galternatives' (universe)
alternatives: command not found
i downloaded the galternative app but when i run it i don't find multiple choices on any "java" related alternative...
EDIT : after searching a bit i found about this command (sudo update-alternatives --config java) and used it and here is the OUTPUT from it :
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Nothing to configure.
so i guess it's safe to assume that this is not a problem of alternative installations of java...
SOLUTION :
i actually made it by Uninstalling openjdk-8 and installing oracle Java-8
1) Uninstalling openjdk-8 on ubuntu-based distributions using this command :
sudo apt-get purge openjdk-8-*
(here is a more general tutorial to uninstall Java in general http://www.2daygeek.com/remove-uninstall-oracle-java-openjdk-on-ubuntu-centos-debian-fedora-mint-rhel-opensuse/)
2) Installing Oracle Java-8 using this command :
sudo apt-get install oracle-java8-set-default
or following this tutorial (http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html)