
- Im going to use java for developing android apps.
- Java 6 is reaching its end of life;
- And Oracle has decided to nullify any license allowing distros to maintain Java in their repos;
So, the easiest way i found to install java 7:
- Add this PPA's:
- Install and enter the config:
- And set witch jvm will you use:
Confirm that java is installed by typing "java -version" and "javac -version"
Now... like me, you may want to define your $JAVA_HOME and $PATH variables
By default your java should be in "/usr/lib/jvm/java-7-oracle" (if not, don't worry, use your directory).
Open your terminal and type "sudo nano /etc/bash.bashrc"* (im using "nano" but you can use "gedit" or other editor).
Add this lines to the end of the file:
"export JAVA_HOME=/usr/lib/jvm/java-7-oracle"
"export PATH=$PATH:$JAVA_HOME/bin"
Save it and close it. To confirm that everything is working, log out and log in again, open a terminal and type: "echo $JAVA_HOME". The output should be something like "/usr/lib/jvm/java-7-oracle".
*if the variable is not set try using the file "~/.bashrc" instead of "/etc/bash.bashrc"
Sem comentários:
Enviar um comentário