problem running eclipse on ubuntu?

后端 未结 11 1840
不思量自难忘°
不思量自难忘° 2020-12-24 12:37

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 i         


        
相关标签:
11条回答
  • 2020-12-24 13:05

    First of all you need to set your JAVA path in .bashrc file. goto cd ~ open .bashrc,vi .bashrc add a line at the end export path="path/to dir:$path" do source .bashrc for changes to take effect.

    Then open your eclipse.ini file(if you want to locate eclipse.ini do whereis eclipse). open eclipse.ini,then add a line

    -vm
    "path/to/bin/of/open-jdk"
    
    0 讨论(0)
  • 2020-12-24 13:08

    You need to add the JDK to your PATH.

    This link should help you get started.

    0 讨论(0)
  • 2020-12-24 13:08

    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.

    0 讨论(0)
  • 2020-12-24 13:11

    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!

    0 讨论(0)
  • 2020-12-24 13:18

    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.

    0 讨论(0)
提交回复
热议问题