problem running eclipse on ubuntu?

2020-02-17 09:02发布

I downloaded eclipse on ubuntu. But when I run it it show following error.

A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/home/awan/eclipse/jre/bin/java
java in your current PATH

Can someone help me to solve this. I don't have experience about this on ubuntu.

thanks

11条回答
做自己的国王
2楼-- · 2020-02-17 09:39

You need to install either the openjdk-7-jre or oracle-java7-jre package.

sudo apt-get install openjdk-7-jre

Note that openjdk-7-jre is easier to install, because it's available via the standard Ubuntu repository, whereas you have to build oracle-java7-jre yourself using java-package.

查看更多
▲ chillily
3楼-- · 2020-02-17 09:42

I had similar problem. It solved after, I have download JRE from http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html

and put it in the path of eclipse as shown below -

abc@ubuntu:~/Downloads/eclipse$ ls

about_files
configuration
eclipse.ini
icon.xpm
p2 about.html
dropins
epl-v10.html
jre
plugins artifacts.xml
eclipse
features
notice.html
readme

I hope it helps.

查看更多
贼婆χ
4楼-- · 2020-02-17 09:43

I tried editing .profile, .bashrc, to no avail. (I'm trying to use eclipse by clicking an icon, NOT by executing it from a bash shell).

SOLUTION: I copied my /home/denise/jdk1.7.0_25/jre to /home/denise/dev//jre

which is a stupid solution because it defeats the purpose of having a .profile or .bashrc.

and no, there was no .pam_environment file

peace!

查看更多
神经病院院长
5楼-- · 2020-02-17 09:47

I solved this error message by adding jre path in to eclipse.ini.To solve the error like this,your machine should have java installed. In my setup eclipse.ini is in eclipse-jee-mars-linux-gtk-x86_64-5.0.0/eclipse folder.

Add,

-vm /home/user/Documents/Softwares/jdk-8u202-linux-x64/jdk1.8.0_202/jre/bin

at the top of the file.

In here /home/user/Documents/Softwares/jdk-8u202-linux-x64/jdk1.8.0_202 is my JAVA_HOME

For me, directing JDK path to -vm didn't work.I had to put the jre/bin path which is inside jdk folder.

查看更多
等我变得足够好
6楼-- · 2020-02-17 09:48

You need to have a Java environment that can execute the Java instructions in Eclipse for it to run.

Install a suitable Java package in the package manager, and try again. Note that Eclipse does not require a JDK, a JRE is enough.

查看更多
放荡不羁爱自由
7楼-- · 2020-02-17 09:49

You need to install the JDK or OpenJDK (Eclipse only officially supports the former, but the latter mostly works).

查看更多
登录 后发表回答