As in the previous post installation JDK on XP, download the Ubuntu virtual machine from Sun official website. In this case download a file. Bin that will be installed as follows once you have downloaded:
terminal in a Change to the directory where the file we have descargdo Java, in my case I have downloaded to your desktop. Once located in the folder use the chmod command to access the binary file in run mode:
$ chmod + x jdk-6u16-linux-i586.bin
The value "16" can change depending on the version you want to install. Now to run the installation file will do as root as follows:
$ sudo ./jdk-6u16-linux-i586.bin
and typing our password user. Automatically display the license agreement for Java, which can go by pressing the spacebar. Once finished reading the contract we have to accept it by pressing Y and then enter. When you end the process of generating the JVM folder and press enter to continue in your browser will open the registration page Java.
The above process creates a folder with permissions that have to move to a folder of Java libraries for our system with the following statement:
$ sudo mv jdk1.6.0_16 / usr / lib / jvm
where / usr / lib / jvm is the destination folder
Now install the new version of Java as one of the alternative system as follows:
$ sudo update-alternatives - install "/ usr / bin / java" "java" "/ usr/lib/jvm/jdk1.6.0_16/bin/java" 1
and establishes the new alternative to Java:
$ sudo update-alternatives - set java / usr/lib/jvm/jdk1.6.0_16/bin/java
NOTE: update-alternatives serves to specify a schedule for a task that we want to make through blogs.
now establish the system alternatives to compile the programs from any location through a terminal with the following two statements:
$ sudo update-alternatives - install "/ usr / bin / javac" "javac" "/ usr/lib/jvm/jdk1.6.0_16/bin/javac" 1
$ sudo update-alternatives - set javac / usr/lib/jvm/jdk1.6.0_16/bin/javac
0 comments:
Post a Comment