In some versions of ubuntu, such as 10.10, the following strange problems may occur:
1. Install JDK
The jdk I downloaded is in Bin format. Run the command to decompress it and get a folder.
This folder is used as the JDK installation directory and can be copied to any directory.
Then configure the environment variable ~ /. Bashrc, add at the end:
Export java_home = <JDK install dir>
Export jre_home = $ java_home/JRE
Export Path = $ java_home/bin: $ jre_home/bin: $ path
Restart the machine.
2. Install eclipse
Decompress the downloaded eclipse package to any directory and use it as the installation directory of Eclipse.
3. Run eclipse
Go to the eclipse installation directory and double-click eclipse. the following error occurs:
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/gaoyl/Setup/Eclipse/JRE/bin/Java
Java in your current path
However, if it is executed through a terminal or through a command line, it will not be faulty and can be started normally.
This problem is strange. I don't know what the root cause is, but I can solve it using the following methods:
$ CD <eclipse dir>
$ Ln-SF $ jre_home JRE
The purpose is to create a link named JRE under the eclipse installation directory and direct it to the JRE directory under the Java installation directory
Http://hi.baidu.com/gaogaf/item/71c75e0be1795feb34990277