Jump to content
Sign in to follow this  

Установка java

Recommended Posts

Пробую установить нужную вверсию Java по инструкциям



 I'm assuming you've already downloaded both tars, JDK and JRE. So, here's what you have to do:
First create a directory to hold your Java JDK and JRE binaries:

sudo mkdir -p /usr/local/java
Then, copy the Java binaries into the /usr/local/java directory:
cd folder_where_your_tars_are_located
sudo cp -r jdk-7u21-linux-i586.tar.gz /usr/local/java
sudo cp -r jre-7u21-linux-i586.tar.gz /usr/local/java
cd /usr/local/java
Unpack the compressed Java binaries, in the directory /usr/local/java:
sudo tar xvzf jdk-7u21-linux-i586.tar.gz
sudo tar xvzf jre-7u21-linux-i586.tar.gz
Edit the system PATH file /etc/profile and add the following system variables to your system path. Use nano, geany, gedit or any other text editor, as root:
sudo geany /etc/profile
and add the following lines below to the end of your /etc/profile file:
export JAVA_HOME
export JRE_HOME
export PATH
Save the /etc/profile file and exit.
After that, notify your Ubuntu system where your Java JDK/JRE are located:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.7.0_21/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_21/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jre1.7.0_21/bin/javaws" 1
and that Java JDK/JRE must be the default Java:
sudo update-alternatives --set java /usr/local/java/jre1.7.0_21/bin/java
sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_21/bin/javac
sudo update-alternatives --set javaws /usr/local/java/jre1.7.0_21/bin/javaws
Finally, reload your system wide PATH /etc/profile by typing the following command:
. /etc/profile 





В итоге ничего не работает




вожусь уже пару часов все не как не пойму что не так делаю


есть какой то автоматический вариант установки java старой версии?

Edited by AzogConqueror

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...