9th Jan, 2009

How to install Java SDK on ubuntu

1 Star2 Stars3 Stars4 Stars5 Stars (Nessun voto)
Loading ... Loading ...

  1. Open a terminal and type:
    sudo apt-get install java6-sdk
  2. You will get a message similar to:

    Lettura della lista dei pacchetti in corso... Fatto
    Generazione dell'albero delle dipendenze in corso       
    Lettura delle informazioni di stato... Fatto     
    Il pacchetto java6-sdk รจ un pacchetto virtuale fornito da:
      sun-java6-jdk 6-07-3ubuntu2
      openjdk-6-jdk 6b11-2ubuntu2
    Bisogna esplicitamente sceglierne uno da installare.
    E: Il pacchetto java6-sdk non ha candidati da installare

  3. Type

    sudo apt-get install sun-java6-jdk
  4. Then open with your favourite text editor (vim, gedit, pico, …) the file ~/.bash_profile (in this case with vim):

    vim ~/.bash_profile
  5. Add this line to the file (first check that the installation directory is the same!):

    export JRE_HOME=/usr/lib/jvm/java-6-sun-1.6.0.07
  6. Finally type

    source ~/.bash_profile

    and you’re done! :)





Leave a response

Your response:

Categories