problem running eclipse on ubuntu?

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

提交回复
热议问题