GCJ 1.4.2 which was forcefully bundled with Fedora Core 6 (and has been updated from their repository to the latest available version) must not be used with any enterprise product, nay for any Java project at all. 1.4.2 GCJ que foi empacotado com veemência o Fedora Core 6 (e foi atualizado a partir de seu repositório para a última versão disponível) não deve ser usado com qualquer empresa produto, sim para qualquer projeto Java em tudo. I know it is being used in OpenOffice, which I think is a serious mistake. Sei que ele está sendo usado em OpenOffice, que penso que é um erro grave. It is dangerously buggy and needs tons of testing even for hobbyist usage. Trata-se perigosamente buggy e necessidades de toneladas de testes até mesmo para uso hobbyist. Let me explain why. Deixe-me explicar porquê.

Initializing Date class with no arguments gives the current Date. Inicializando Data classe sem argumentos dá a data actual. This is a very basic functionality which has been since 0.5 beta version of Java. Esta é uma grande funcionalidade básica que tem sido dado 0,5 versão beta do Java. Let me give a simple example: Deixe-me dar um exemplo simples:

 public class TestDate {     public static void main(String args[]) {         System.out.println(”The current date is: ” + new java.util.Date());     } } público classe TestDate (public static void main (String args []) (System.out.println ( "A data actual é a seguinte:" + new java.util.Date ());)) 

This when compiled and run on GCJ 1.4.2 gives May 24th 2007 instead of the current date June 13th 2007! Isto quando compilado e executado em GCJ 1.4.2 dá 24 de maio de 2007 a data actual em vez de 13 de junho 2007! Even the time and locale information is totally incorrect. Até o momento eo local informação é totalmente incorrecta. The JDK results are fully in sync with the Gnome display as also with date output from console as is to be expected. O JDK resultados estão em plena sintonia com o Gnome mostrar como também com data de saída do console como é de se esperar. I have no idea where GCJ gets the date value from. Não tenho a menor idéia onde GCJ começa a contar da data de valor. I found this problem in a JSP code running on Tomcat which unfortunately has been configured by Fedora to run with GCJ. Eu encontrei esse problema em um código JSP Tomcat rodando em que infelizmente foi configurado para ser executado em Fedora com o GCJ.

I have tested it on two machines with vastly differing hardware but with same results. Eu testei-o em duas máquinas com hardware amplamente diferente, mas com mesmos resultados. I couldn’t believe my eyes. Eu não podia acreditar meus olhos. Check it for yourself: Check-lo para si mesmo:

[angsuman@jaguar ~]$ /etc/alternatives/java_sdk/bin/java -version && /etc/alternatives/java_sdk/bin/javac TestDate.java && /etc/alternatives/java_sdk/bin/java TestDate [angsuman jaguar @ ~] $ / etc / alternatives java_sdk / bin / java-versão & & / etc / alternatives java_sdk / bin / javac TestDate.java & & / etc / alternatives java_sdk / bin / java TestDate
java version “1.4.2″ Java versão "1.4.2"
gij (GNU libgcj) version 4.1.1 20070105 (Red Hat 4.1.1-51) gij (GNU libgcj) versão 4.1.1 20070105 (Red Hat 4.1.1-51)

Copyright (C) 2006 Free Software Foundation, Inc. Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. Isto é software livre; veja o código fonte para copiar condições. There is NO Não há nenhuma
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. garantia; nem mesmo para COMERCIALIZAÇÃO OU ADEQUAÇÃO A UM DETERMINADO PROPÓSITO.
The current date is: Thu May 24 15:04:07 GMT-`1:47 2007 A data actual é a seguinte: Qui 24 de maio 15:04:07 GMT-1:47 `2007

[angsuman@jaguar ~]$ java -version && javac TestDate.java && java TestDate [angsuman jaguar @ ~] $ java-version javac TestDate.java & & & & java TestDate
java version “1.6.0_01″ java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06) Java (TM) SE Runtime Environment (construir 1.6.0_01-b06)
Java HotSpot(TM) Server VM (build 1.6.0_01-b06, mixed mode) Java HotSpot (TM) Server VM (construir 1.6.0_01-b06, modo misto)
The current date is: Wed Jun 13 22:21:56 IST 2007 A data actual é a seguinte: Qua Jun 13 22:21:56 EST 2007

Note: The above is raw output from my machine. Nota: A produção de matérias-primas acima é a minha máquina.

Any JVM which cannot even correctly give the date isn’t worth a dime in book, let alone be a JDK replacement. Qualquer JVM que não pode sequer dar correctamente a data não vale um centavo no livro, e muito menos ser um substituto JDK. Not to mention this piece of $%^& doesn’t support generics or other JDK 5 & 6 features. Já para não falar desta peça de $% ^ & não suporta genéricos ou outro JDK 5 & 6 características. I would strongly suggest any Linux user to stay away from GCJ. Gostaria de sugerir qualquer usuário do Linux para ficar longe do GCJ. What GCJ implements is simply not Java; it is hazardous for your programming health and reputation, not to mention Java’s reputation. O que é, pura e simplesmente não implementa GCJ Java; é perigoso para a sua programação da saúde e da reputação, para não mencionar a reputação da Java.