JDK 6 Fedora Core developers make it rather hard to install and properly configure Sun’s JVM. Fedora sviluppatori rendono piuttosto difficile da installare e configurare correttamente Sun JVM. All said and done Sun’s JVM (comes with JDK) is the best JVM implementation out there; not to mention that it is the reference implementation. Tutti i detto e fatto di Sun JVM (viene fornito con JDK) è la migliore attuazione JVM là fuori, per non parlare che sia l'implementazione di riferimento. Here is how you can easily install JDK 6 / Java SE 6 in 5 minutes or less. Ecco come si può facilmente installare JDK 6 / Java SE 6 in 5 minuti o meno. Here are the steps: Ecco i passi del processo:

1. Login as root Il login come root

2. First you need to download it from Per prima cosa è necessario scaricarlo da here qui . This works fine from GUI browsers like Firefox, Internet Explorer or Safari. Questo funziona bene da GUI browser come Firefox, Internet Explorer o Safari. However Sun makes it very hard (from java.sun.com) to download it for Linux console users (like those trying to install on their dedicated web server). Tuttavia Sun rende assai difficile (da java.sun.com) per scaricarlo per gli utenti di Linux console (come coloro che cercano di installare sul loro server web dedicato). You cannot access the download link from text based lynx browser. Non è possibile accedere al link di download dal testo basato lince browser. Fortunately there is a way. Fortunatamente c'è un modo. I found a Ho trovato un secret location località segreta for you to easily download JDK 6 using wget or curl (console apps). per voi facilmente scaricare JDK 6 utilizzando wget o curl (console applicazioni). This is also very useful if you are planning to use any download accelerators. Questo è anche molto utile se si vuole usare qualsiasi acceleratori di download. The current binary (32 bit version) is L'attuale binario (32 bit version) here qui . This link will surely change with time so it is better to browse to the link above and then access this link from that page. Questo link sicuramente mutare nel tempo in modo che sia meglio visitare il link qui sopra e poi accedere a questo link da quella pagina.

Download it using wget or curl. Scaricarlo utilizzando wget o curl. The command, for example, today will be: Il comando, ad esempio, oggi saranno:
wget http://www.java.net/…/jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin http://www.java.net/… / jdk-6u2-bis-B02-bin-linux-i586-12_apr_2007-rpm.bin

Note: The link has been truncated for brevity, however it is hyperlinked to the actual link. Nota: Il link è stato troncato per brevità, tuttavia si tratta di un collegamento ipertestuale per l'effettivo collegamento.

3. Now change the permission of the downloaded file to 755 like this: Ora cambiare il permesso del file scaricato a 755 in questo modo:
chmod 755 jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin chmod 755 jdk-6u2-bis-B02-bin-linux-i586-12_apr_2007-rpm.bin

4. Then run it: Quindi eseguirlo:
./jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin

You will need to type yes to indicate your acceptance to their agreement and the installation will complete on its own. Hai bisogno di tipo per indicare l'accettazione della loro accordo e l'installazione completa di per sé. Unfortunately you are not yet done. Purtroppo non si è ancora fatto. Type java -version on the command line and you will see that it still points to the crappy old JVM from gcj. Tipo java-versione a linea di comando e vedrete che punta ancora a crappy il vecchio JVM da gcj.

5. Now you need to find the actual location of your JDK installation and indicate to Fedora to accept your choice. Ora hai bisogno di trovare la posizione della vostra installazione di JDK e indicare a Fedora Core per accettare la scelta.

Type the following: Digitare il seguente:
updatedb;locate javac |grep bin updatedb; individuare javac | grep bin

You will see an entry like this: Vedrai una voce simile a questo:
/usr/java/jdk1.6.0_02/bin/javac / usr/java/jdk1.6.0_02/bin/javac

Here /usr/java/jdk1.6.0_02 is the actual JAVA_HOME for your machine. Qui / usr/java/jdk1.6.0_02 è l'effettiva JAVA_HOME per la propria macchina. Note this as you will need it to run the future commands. Nota come questa ti serviranno per il futuro eseguire comandi.

Now you need to run the alternatives command to instruct Fedora to recognize Sun’s JVM. Ora è necessario eseguire il comando alternative, di incaricare Fedora Core a riconoscere di Sun JVM.
alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_02/bin/ java 100 alternatives - install / usr / bin / java java / usr/java/jdk1.6.0_02/bin / java 100
alternatives --install /usr/bin/jar jar /usr/java/jdk1.6.0_02/bin/ jar 100 alternatives - install / usr / bin / vaso vaso / usr/java/jdk1.6.0_02/bin / barattolo 100
alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_02/bin/ javac 100 alternatives - install / usr / bin / javac javac / usr/java/jdk1.6.0_02/bin / javac 100

You can do this for other Java executables too, should you need them, following the same pattern. Lo si può fare per gli altri eseguibili Java troppo, dovrebbe ne avete bisogno, seguendo lo stesso schema.

Note: If alternatives is not in your path then use locate alternatives to locate it. Nota: Se le alternative non è nel tuo percorso di individuare quindi utilizzare per individuare soluzioni alternative.

Finally you should configure alternative to use Sun’s JVM as the default JVM. Infine è necessario configurare alternativa di utilizzare Sun JVM come predefinito JVM. To do this type: Per fare questo tipo:
/usr/sbin/alternatives --config java / usr / sbin / alternatives - config java

This will present you with at least 2 options. Questo si presenterà con almeno 2 opzioni. Choose the one for Sun’s JVM. Scegliere quello per JVM di Sun. Similarly repeat the process for other commands. Allo stesso modo ripetere la procedura per altri comandi.

Now you are done configuring Fedora for the most part. Ora avete finito la configurazione di Fedora Core per la maggior parte. Type java -version and you should see something like this: Tipo java-versione e si dovrebbe vedere qualcosa come questo:

java version “ 1.6.0_02 -ea” java version "1.6.0_02-bis"
Java(TM) SE Runtime Environment (build 1.6.0_02-ea-b02) Java (tm) SE Runtime Environment (build 1.6.0_02-bis-B02)
Java HotSpot(TM) Client VM (build 1.6.0_02-ea-b02, mixed mode, sharing) Java HotSpot (TM) Client VM (build 1.6.0_02-bis-B02, modalità mista, la condivisione)

Note: This works for most part, except Tomcat. Nota: Questo funziona per la maggior parte parte, ad eccezione di Tomcat. The default installation of Tomcat has been hardwired to use GCJ. La installazione di default di Tomcat è stato hardwired di utilizzare GCJ. I changed the configuration file and it didn’t help. Ho cambiato il file di configurazione e non di aiuto. My solution for Tomcat is to ditch Fedora’s version and install directly from site. La mia soluzione per Tomcat è a fossa la versione di Fedora Core e installare direttamente dal sito. It works like a charm. Funziona come un fascino. Set JAVA_HOME to the value we found above and you are done. JAVA_HOME a impostare il valore di cui sopra abbiamo trovato e avete finito.