Installare Java su Debian: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
==Debian 5 Lenny | =Debian 7 Wheezy= | ||
* Usare make-jpkg | |||
* Installarlo: | |||
sudo apt-get install java-package | |||
* Scaricare il pacchetto java che si vuole utilizzare da *[http://www.oracle.com/technetwork/java/javase/downloads/index.html Java SE - Downloads | Oracle Technology Network | Oracle] | |||
* Creare il .deb: | |||
make-jpkg jdk-7u45-linux-x64.tar.gz | |||
* Installarlo: | |||
sudo dpkg -i oracle-j2sdk1.7_1.7.0+update45_amd64.deb | |||
==Riferimenti== | |||
*[https://wiki.debian.org/JavaPackage JavaPackage - Debian Wiki] | |||
=Debian 5 Lenny= | |||
* Installare i pacchetti | * Installare i pacchetti | ||
| Line 7: | Line 24: | ||
sudo update-alternatives --config java | sudo update-alternatives --config java | ||
==Riferimenti== | |||
* [http://www.oneunified.net/blog/OpenSource/Debian/Development/sunjava.article One Unified Blog -> Installing Sun Java on Debian Lenny] | * [http://www.oneunified.net/blog/OpenSource/Debian/Development/sunjava.article One Unified Blog -> Installing Sun Java on Debian Lenny] | ||
=Debian 4 Sarge= | |||
To find out which version is installed, just open up a command line and type java -version in there. | To find out which version is installed, just open up a command line and type java -version in there. | ||
Revision as of 17:30, 8 April 2015
Debian 7 Wheezy
- Usare make-jpkg
- Installarlo:
sudo apt-get install java-package
- Scaricare il pacchetto java che si vuole utilizzare da *Java SE - Downloads | Oracle Technology Network | Oracle
- Creare il .deb:
make-jpkg jdk-7u45-linux-x64.tar.gz
- Installarlo:
sudo dpkg -i oracle-j2sdk1.7_1.7.0+update45_amd64.deb
Riferimenti
Debian 5 Lenny
- Installare i pacchetti
sudo apt-get install sun-java6-jre
- Impostare SUN Java come default:
sudo update-alternatives --config java
Riferimenti
Debian 4 Sarge
To find out which version is installed, just open up a command line and type java -version in there.
Installing the Sun J2SE on Debian Sarge
First, open a Shell window:
su <Your root password> cd ../../etc/apt nano -w sources.list
Add:
contrib non-free
To the last three lines, example of finished file:
#deb file://cdrom/ sarge main
deb http://ftp.uk.debian.org/debian/ stable main contrib non-free deb-scr http://ftp.uk.debian.org/debian/ stable main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
Use CTRL+O to write the changes
Back in the Shell window:
apt-get update
Now that all this is done, your system is ready to install Java. Grab the non rpm Linux self extracting file from http://java.sun.com/j2se/1.5.0/download.jsp (currently jre-1_5_0_04-linux-i586.bin). Just save it to your /home/<user> directory.
Back in the Shell console:
apt-get install java-package
Once installed:
exit cd ../../home/<user> fakeroot make-jpkg jre-1_5_0_04-linux-i586.bin
This may take some time... Once done:
su <Your root password> dpkg -i sun-j2re1.5_1.5.0+update04_i386.deb
Again, could take a while... finally, once done:
chown -R root:root /usr/java/jre1.5.0_02/ ln -s /usr/java/jre1.5.0_02/bin/java /usr/bin/java ln -s /usr/java/jre1.5.0_02/bin/java_vm /usr/bin/java_vm cp /etc/bash.bashrc /etc/bash.bashrc_backup
vim /etc/bash.bashrc
Use your favorite editor to add the following lines at the end:
JAVA_HOME=/usr/java/jre1.5.0_02 export JAVA_HOME PATH=$PATH:$JAVA_HOME/bin export PATH
Check all went well with:
java -version
Done? Good!