Recently, we need to use Vuze software to download things in the Ubuntu system. When we run the program, we are prompted that there is a lack of JRE environment. In order to solve this problem, we have found many solutions on the Internet. Under normal conditions, run the following command to install:
sudo apt-get install openjdk-7-jre
However, after the command is executed, the error “package ‘openjdk-7-jre’ has no installation candidate” is prompted, as shown in the figure below
This problem should be caused by the current data source does not contain JRE, but it is also troublesome to find an available data source to add. In fact, you can directly download the tar.gz package corresponding to JRE from Oracle’s Java official website. The command is as follows:
wget http://javadl.oracle.com/webapps/download/AutoDL?BundleId=225345_090f390dda5b47b9b721c7dfaa008135
Unzip the downloaded file, I put it directly under the home directory, and change the unzipped folder name to JRE, which is ~/JRE code>. Then, set the environment variables by modifying the
/etc/profile code> file. The command is as follows:
sudo gedit /etc/profile
Add the following lines at the end of the file:
export JAVA_HOME=~/jre
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib
Save, exit. Enter the following command to make it work. (you may need to restart the system here)
sudo source /etc/profile
Check the Java version,
java -version
If the version information is displayed successfully, the environment is installed successfully
When executing the source code> command, the prompt "command not found" is also dizzy. The reason mentioned on the Internet is due to the modification of the path environment variable. You need to re export the environment variable through the following command:
export PATH=/bin:/usr/bin:/usr/local/bin
So far, the problem has been solved.
Read More:
- Eclipse startup error: a Java runtime environment (JRE) or Java Development Kit (JDK) must be available
- Error loading in flex integration: Java / jdk1.6.0_ 35\jre\bin\server\ jvm.dll
- could not open `C:\Program Files\Java\jre1.8.0_191\lib\amd64\jvm.cfg’
- How to install cuda10.01in Ubuntu18.04
- [Solved] Tomcat9 Startup Error: Failed creating Java ‘XXXX\Java\jdk1.8\jre\bin\server\jvm.dll‘.
- Java:Error:Open registry key software \ JavaSoft \ Java Runtime Environment Problems
- Error: could not open `C:\Program Files\Java\jre1.8.0_211\lib\amd64\jvm.cfg’ (How to Fix)
- How to install postman tool in Ubuntu 16.04
- [Linux] failed to install libudev dev in Ubuntu 18.04
- [solution] install L2TP and related settings in Ubuntu 18.04
- How to install scikit learn and other scientific computing libraries in Ubuntu 16.04
- Error: missing `server’ JVM at `C:\Program Files (x86)\Java\jre1.8.0_231\bin\server\jvm.dll’.
- Error handling of apt instruction e: unmet dependencies. Try ‘apt — fix broken install’ with no packages in Ubuntu 20.04
- Error: could not find java.dll Error: could not find Java se runtime environment solution
- Could not find appears when JDK is configured java.dll Could not find Java se runtime environment problems
- Howto Install and Configure VTK on Ubuntu
- Configure Java environment variables for Ubuntu with Zsh configuration
- Error: opening registry key ‘Software\JavaSoft\Java Runtime Environment’
- Eclipse can’t open an error: Error:could not find java SE Runtime Environment/Error: could not find java.dll
- Microsoft Store install Ubuntu