problem running eclipse on ubuntu?

后端 未结 11 1839
不思量自难忘°
不思量自难忘° 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 12:53

    If you allready installed java** you need to add the Java-Path to your eclipse.ini

    in my case it's located at:

    /usr/lib/eclipse/eclipse.ini
    

    there you need to add direct under the "openFile" statement, where you replace the path with your java path:

    -vm
    /usr/lib/jvm/java-7-openjdk/bin/java    //!replace with your path to java!
    

    ** check wether java is installed by typing the commands

    java -version 
    

    or

    javac -version
    

    If you are sure that java is installed, but it's not found you may have multiple versions installed, check that by:

    sudo update-alternatives --config java
    

    and select installation first

    0 讨论(0)
  • 2020-12-24 12:58

    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.

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

    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.

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

    Just copy jre and paste in eclipse folder that's it. After this just click on eclipse icon to launch eclipse. Thanks.

    artifacts.xml
    configuration
    dropins
    eclipse
    eclipse.ini
    features
    icon.xpm
    jre
    p2
    plugins
    readme

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

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

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

    I solved it by created a symbolic link java in /usr/bin that points to the VM.

    Steps :

    1. Downloaded the appropriate version of Oracle's JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp

    2. extract it to any folder. For example :

      tar zxvf ~/Downloads/jdk-8u5-linux-x64.tar.gz ~/DEV

    3. create symbolic link with name java :

      cd /usr/bin

      ln -s ~/DEV/jdk1.8.0_05/bin/java java

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