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
Method 1: Installing Eclipse using Snap [Easy]You can either install it from the terminal or the software center in Ubuntu. Open the Software Center application in Ubuntu and search for Eclipse and install it from there.
Eclipse works great for Android development, both on Windows and on Linux. This is due to the way it's built, it uses Java and does not rely on any operating system specifics.
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
.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With