[
https://issues.jboss.org/browse/JBDS-4454?page=com.atlassian.jira.plugin....
]
Nick Boldt commented on JBDS-4454:
----------------------------------
{code}
$➔ alternatives --display java
java - status is auto.
link currently points to
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-8.b14.fc24.x86_64/jre/bin/java
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-8.b14.fc24.x86_64/jre/bin/java - family
java-1.8.0-openjdk.x86_64 priority 1800121
...
Current `best' version is
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-8.b14.fc24.x86_64/jre/bin/java.
{code}
But...
{code}$➔ for j in $(whereis java); do if [[ -d ${j} ]]; then continue; elif [[ -x ${j} ]];
then echo ${j}; ls -la ${j}; ${j} -version; echo ""; fi; done
/usr/bin/java
lrwxrwxrwx 1 root root 22 Apr 3 09:59 /usr/bin/java -> /etc/alternatives/java
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b14)
OpenJDK 64-Bit Server VM (build 25.121-b14, mixed mode)
/opt/jdk1.8.0_102/bin/java
-rwxr-xr-x. 1 root root 7734 Jun 22 2016 /opt/jdk1.8.0_102/bin/java
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
/opt/jdk-9-ea+140/bin/java
-rwxr-xr-x 1 10 143 8512 Oct 12 2016 /opt/jdk-9-ea+140/bin/java
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+140)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+140, mixed mode)
$➔ ls -la /etc/alternatives/java
lrwxrwxrwx 1 root root 72 Apr 3 09:59 /etc/alternatives/java ->
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-8.b14.fc24.x86_64/jre/bin/java
{code}
So the bottom line is that the default JDK found on my system is the one referenced by
*/etc/alternatives/java*.
So rather than fetching the system value, we can search for one of these paths:
* /etc/alternatives/java_sdk/bin/java
* /etc/alternatives/java_sdk/jre/bin/java
* /etc/alternatives/jre/bin/java
-----
Also found another bug:
If you select a Specific Java VM, then click back to Default Java VM, then Specific Java
VM again, then click back to Default Java VM a second time, here's what ends up in
your devstudio.ini file:
{code}
$➔ cat studio/devstudio.ini
-vm
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-8.b14.fc24.x86_64//usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-8.b14.fc24.x86_64
...
{code}
Path to JDK needs to be updated after every update of JDK
---------------------------------------------------------
Key: JBDS-4454
URL:
https://issues.jboss.org/browse/JBDS-4454
Project: Red Hat JBoss Developer Studio (devstudio)
Issue Type: Enhancement
Components: build, installer
Affects Versions: 11.0.0.AM1
Environment: Fedora 26
Reporter: Josef Kopriva
Assignee: Nick Boldt
Fix For: 11.0.0.GA
Attachments: image-2017-06-30-11-01-40-783.png, screenshot-1.png
After every update of JDK, path to JDK in file devstudio.ini needs to be updated. This
does not happening in Eclipse.
!image-2017-06-30-11-01-40-783.png|thumbnail!
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)