JDK 6 Fedora Core developers make it rather hard to install and properly configure Sun’s JVM. Fedora Core desenvolvedores torná-la um pouco difícil de instalar e configurar corretamente da 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. Tudo dito e feito da Sun JVM (vem com o JDK) é a melhor implementação JVM lá fora, para não falar que é a implementação de referência. Here is how you can easily install JDK 6 / Java SE 6 in 5 minutes or less. Aqui está como você pode instalar facilmente o JDK 6 / Java SE 6, em 5 minutos ou menos. Here are the steps: Aqui estão os passos:

1. Login as root Login como root

2. First you need to download it from Primeiro você precisa para baixá-lo a partir de here aqui . This works fine from GUI browsers like Firefox, Internet Explorer or Safari. Isso funciona bem a partir de GUI navegadores como o Firefox, Internet Explorer ou 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). No entanto Sun torna muito difícil (a partir de java.sun.com) para baixá-lo para o Linux console usuários (como aqueles a tentar instalar em seu servidor web dedicado). You cannot access the download link from text based lynx browser. Você não pode acessar o link de download lince navegador baseado em texto. Fortunately there is a way. Felizmente há uma maneira. I found a Eu encontrei um secret location local secreto for you to easily download JDK 6 using wget or curl (console apps). para que você possa facilmente download JDK 6 usando wget ou curl (console apps). This is also very useful if you are planning to use any download accelerators. Isso também é muito útil se você está planejando usar a qualquer download aceleradores. The current binary (32 bit version) is O actual binário (32 bits versão) é here aqui . 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. Esta ligação vai mudar com o tempo, por isso, é melhor para navegar até o link acima e então acessar este link a partir dessa página.

Download it using wget or curl. Download-lo usando wget ou encurvamento. The command, for example, today will be: O comando, por exemplo, hoje será:
wget http://www.java.net/…/jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin http://www.java.net/… / jdk-6u2-EA-bin-B02-linux-i586-12_apr_2007-rpm.bin

Note: The link has been truncated for brevity, however it is hyperlinked to the actual link. Nota: O link foi truncado para a brevidade, no entanto, é hiperlink para a efectiva ligação.

3. Now change the permission of the downloaded file to 755 like this: Agora mudar a permissão do arquivo baixado para 755 como este:
chmod 755 jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin chmod 755 jdk-6u2-EA-bin-B02-linux-i586-12_apr_2007-rpm.bin

4. Then run it: Então execute-o:
./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. Você precisa de tipo "sim" para indicar a sua aceitação para o seu acordo e que a instalação será concluída a sua própria. Unfortunately you are not yet done. Infelizmente você ainda não está concluído. Type java -version on the command line and you will see that it still points to the crappy old JVM from gcj. Tipo java-versão sobre a linha de comando e você verá que ele ainda chama a atenção para a antiga CRAPPY JVM de GCJ.

5. Now you need to find the actual location of your JDK installation and indicate to Fedora to accept your choice. Agora você tem de encontrar o verdadeiro local de sua instalação e indicar a JDK Fedora para aceitar a sua escolha.

Type the following: Digite o seguinte:
updatedb;locate javac |grep bin updatedb; localizar javac | grep bin

You will see an entry like this: Você verá uma entrada como esta:
/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. Aqui / usr/java/jdk1.6.0_02 é a real JAVA_HOME para a sua máquina. Note this as you will need it to run the future commands. Note como este que você precisa para executar os comandos futuro.

Now you need to run the alternatives command to instruct Fedora to recognize Sun’s JVM. Agora, você precisa executar o comando alternativas para instruir o Fedora para reconhecer Sun's 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 / jar jar / usr/java/jdk1.6.0_02/bin / jar 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. Você pode fazer isso para os outros executáveis Java também, você deve necessitar deles, seguindo o mesmo padrão.

Note: If alternatives is not in your path then use locate alternatives to locate it. Nota: Se alternativas não está em seu caminho, então, usar localizar alternativas para localizá-la.

Finally you should configure alternative to use Sun’s JVM as the default JVM. Finalmente, você deve configurar alternativa ao uso da Sun JVM como o padrão JVM. To do this type: Para fazer este tipo:
/usr/sbin/alternatives --config java / usr / sbin / alternatives - config java

This will present you with at least 2 options. Isto irá apresentar-lhe pelo menos 2 opções. Choose the one for Sun’s JVM. Escolha um para o Sun's JVM. Similarly repeat the process for other commands. Do mesmo modo repita o processo para os outros comandos.

Now you are done configuring Fedora for the most part. Agora você é feito configurando o Fedora Core na sua maior parte. Type java -version and you should see something like this: Tipo java-versão e você deve ver algo como isto:

java version “ 1.6.0_02 -ea” java version "1.6.0_02-eA"
Java(TM) SE Runtime Environment (build 1.6.0_02-ea-b02) Java (TM) SE Runtime Environment (construir 1.6.0_02-EA-B02)
Java HotSpot(TM) Client VM (build 1.6.0_02-ea-b02, mixed mode, sharing) Java HotSpot (TM) Client VM (1.6.0_02 construir-EA-B02, misturados modo, a partilha)

Note: This works for most part, except Tomcat. Nota: Este funciona para a maior parte dos casos, exceto Tomcat. The default installation of Tomcat has been hardwired to use GCJ. A instalação padrão do Tomcat tem sido a utilização hardwired GCJ. I changed the configuration file and it didn’t help. Eu mudei o arquivo de configuração e que não ajudam. My solution for Tomcat is to ditch Fedora’s version and install directly from site. A minha solução para Tomcat é a versão do Fedora vala e instalar diretamente do site. It works like a charm. É como se fosse um charme. Set JAVA_HOME to the value we found above and you are done. Definir a JAVA_HOME o valor encontrado foi exposto, e está feito.