Bug 1874393 - unable to launch Eclipse on F32: No Java virtual machine was found
Summary: unable to launch Eclipse on F32: No Java virtual machine was found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mat Booth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-01 09:22 UTC by Felix Schwarz
Modified: 2026-03-05 00:03 UTC (History)
10 users (show)

Fixed In Version: eclipse-4.16-13.fc32 eclipse-4.16-13.fc33
Clone Of:
Environment:
Last Closed: 2020-09-12 16:33:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Felix Schwarz 2020-09-01 09:22:32 UTC
$ eclipse

error dialog opens:

A Java Runtime Environment … must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: /usr/lib/jvm/java-11/bin/java


installed packages:

eclipse-cdt-native-9.11.1-8.fc32.x86_64
eclipse-ecf-core-3.14.8-4.fc32.noarch
eclipse-emf-core-2.22.0-2.fc32.noarch
eclipse-emf-runtime-2.22.0-2.fc32.noarch
eclipse-emf-xsd-2.22.0-2.fc32.noarch
eclipse-equinox-osgi-4.16-11.fc32.x86_64
eclipse-gef-3.11.0-13.fc32.noarch
eclipse-jdt-4.16-11.fc32.noarch
eclipse-platform-4.16-11.fc32.x86_64
eclipse-pydev-7.7.0-1.fc32.x86_64
eclipse-swt-4.16-11.fc32.x86_64
eclipse-webtools-common-3.18.0-4.fc32.noarch
eclipse-webtools-servertools-3.18.0-4.fc32.noarch
eclipse-webtools-sourceediting-3.18.0-4.fc32.noarch


$ cat /usr/lib/eclipse/eclipse.ini
-protect
root
-startup
plugins/org.eclipse.equinox.launcher_1.5.701.v20200612-0706.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1200.v20200612-0706
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-11/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms512m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Dorg.eclipse.swt.browser.UseWebKitGTK=true
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-Dp2.fragments=/usr/lib/eclipse/droplets,/usr/share/eclipse/droplets
-Declipse.p2.skipMovedInstallDetection=true
-Dosgi.resolver.usesMode=ignore


$ sudo dnf install /usr/lib/jvm/java-11/bin/java
Last metadata expiration check: 0:45:43 ago on Tue Sep  1 10:36:05 2020.
No match for argument: /usr/lib/jvm/java-11/bin/java
Error: Unable to find a match: /usr/lib/jvm/java-11/bin/java


Eclipse does start if I fix the "-vm" argument in eclipse.ini (using "-vm /usr/lib/jvm/java/bin/java").

Comment 1 jiri vanek 2020-09-01 11:12:06 UTC
ll  /usr/lib/jvm/java-11/bin/java
-rwxr-xr-x 1 root root 19008 Jul 18 19:45 /usr/lib/jvm/java-11/bin/java

However is driven by alternatives so you can not install by it. We had an patch fixing this issue, will double check it.


readlink -f   /usr/lib/jvm/java-11/
/usr/lib/jvm/java-11-openjdk-11.0.8.10-2.fc32.x86_64
rpm -qf /usr/lib/jvm/java-11-openjdk-11.0.8.10-2.fc32.x86_64
java-11-openjdk-headless-11.0.8.10-2.fc32.x86_64

But I doubt having headless jre is enough for eclipse. They need full sdk so java-11-openjdk-devel.


In F32 eclipse are configuredto run with java8. So you abve to have installed  java-1.8.0-openjdk-devel to make eclispe running without mingling with -vm arg. Likley somethng wen wrong with dependecies in eclipse pkg, but Mat wlil know more.

Comment 2 Fedora Update System 2020-09-04 08:21:34 UTC
FEDORA-2020-a8304f5856 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-a8304f5856

Comment 3 Mat Booth 2020-09-04 08:27:25 UTC
Yes Eclipse mistakenly expressed a dep on java-headless instead of java-devel. Installing java-11-openjdk-devel should fix the problem, I also submitted an update containing a fixed Eclipse package. Sorry for the inconvenience.

Comment 4 Fedora Update System 2020-09-04 15:28:24 UTC
FEDORA-2020-a8304f5856 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-a8304f5856`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-a8304f5856

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2020-09-04 19:17:04 UTC
FEDORA-2020-f1577cd763 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-f1577cd763`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f1577cd763

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Felix Schwarz 2020-09-05 08:16:29 UTC
Thank you for the update. Unfortunately it does not fix my issue and I think I left out some information in the beginning:

$ ls -l /usr/lib/jvm/
total 8
lrwxrwxrwx. 1 root root   26 Sep  5 10:06 java -> /etc/alternatives/java_sdk
lrwxrwxrwx. 1 root root   32 Sep  1 10:27 java-1.8.0 -> /etc/alternatives/java_sdk_1.8.0
lrwxrwxrwx. 1 root root   40 Sep  1 10:27 java-1.8.0-openjdk -> /etc/alternatives/java_sdk_1.8.0_openjdk
drwxr-xr-x. 7 root root 4096 Sep  1 10:19 java-1.8.0-openjdk-1.8.0.265.b01-1.fc32.x86_64
drwxr-xr-x. 5 root root 4096 Sep  5 10:06 java-11-openjdk-11.0.8.10-2.fc32.x86_64
lrwxrwxrwx. 1 root root   34 Sep  5 10:06 java-openjdk -> /etc/alternatives/java_sdk_openjdk
lrwxrwxrwx. 1 root root   21 Sep  1 10:27 jre -> /etc/alternatives/jre
lrwxrwxrwx. 1 root root   27 Sep  1 10:27 jre-1.8.0 -> /etc/alternatives/jre_1.8.0
lrwxrwxrwx. 1 root root   35 Sep  1 10:27 jre-1.8.0-openjdk -> /etc/alternatives/jre_1.8.0_openjdk
lrwxrwxrwx. 1 root root   50 Jul 28 05:02 jre-1.8.0-openjdk-1.8.0.265.b01-1.fc32.x86_64 -> java-1.8.0-openjdk-1.8.0.265.b01-1.fc32.x86_64/jre
lrwxrwxrwx. 1 root root   24 Sep  1 10:23 jre-11 -> /etc/alternatives/jre_11
lrwxrwxrwx. 1 root root   32 Sep  1 10:23 jre-11-openjdk -> /etc/alternatives/jre_11_openjdk
lrwxrwxrwx. 1 root root   39 Jul 18 19:41 jre-11-openjdk-11.0.8.10-2.fc32.x86_64 -> java-11-openjdk-11.0.8.10-2.fc32.x86_64
lrwxrwxrwx. 1 root root   29 Sep  1 10:27 jre-openjdk -> /etc/alternatives/jre_openjdk

So the issue is that "/usr/lib/jvm/java-11/" does not exist on my system. Not sure what mechanism is responsible for creating that directory. Just in case: My machine was upgraded from F31 -> F32 (and had many upgrades before, not sure what the initial Fedora version was).

$ rpm -qa | grep -i java | grep openjdk | sort
java-1.8.0-openjdk-1.8.0.265.b01-1.fc32.x86_64
java-1.8.0-openjdk-devel-1.8.0.265.b01-1.fc32.x86_64
java-1.8.0-openjdk-headless-1.8.0.265.b01-1.fc32.x86_64
java-11-openjdk-11.0.8.10-2.fc32.x86_64
java-11-openjdk-headless-11.0.8.10-2.fc32.x86_64

Comment 7 Fedora Update System 2020-09-12 16:33:59 UTC
FEDORA-2020-a8304f5856 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2020-09-25 16:45:51 UTC
FEDORA-2020-f1577cd763 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.