To clarify, both are installed
export JAVA_HOME=/usr/lib/jvm/java-9-openjdk-9.0.0.181-7.fc27.x86_64
$JAVA_HOME/bin/java -version
openjdk version "9"
OpenJDK Runtime Environment (build 9+181)
OpenJDK 64-Bit Server VM (build 9+181, mixed mode)
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64
$JAVA_HOME/bin/java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
Alternatives:
sudo update-alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
+ 1 java-9-openjdk.x86_64
(/usr/lib/jvm/java-9-openjdk-9.0.0.181-7.fc27.x86_64/bin/java)
2 java-1.8.0-openjdk.x86_64
(/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/bin/java)
* 3 /usr/java/jdk-9.0.1/bin/java
Enter to keep the current selection[+], or type selection number:
On 11/26/2017 11:31 PM, Ulf Volmer wrote:
On 11/26/2017 11:02 PM, Ulf Volmer wrote:
On 26.11.2017 23:23, cen wrote:
is java-1.8.0-openjdk-devel installed?
It is indeed.
then it should usually works out of the box. As Ed wrote, $JAVA_HOME
should point to the JRE. But in my case, there is no $JAVA_HOME defined,
maven uses the defaults from /etc/alternatives. So you can try to unset
JAVA_HOME.
[ulf@fc27-x1 ~]$ echo $JAVA_HOME
[ulf@fc27-x1 ~]$ mvn -v
Apache Maven 3.5.0 (Red Hat 3.5.0-6)
Maven home: /usr/share/maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.13.12-300.fc27.x86_64", arch: "amd64",
family: "unix"
best regards
Ulf
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx