Page 1 of 1

Java Compiler is FLAWED!!

Posted: Fri Aug 15, 2003 5:24 pm
by xbeanx
I know that the java compiler the OJ is using is flawed.

I solved question 112 using java, and submitted it. I checked it against all test inputs, and compared output to an accepted program I have. Everything was the same, but I still got WA.

I tried every possible input, created an input generator and tested my program with 10000 inputs. My Java program matched the accepted one perfectly.

Yet still I got WA.

So I translated my Java program to C++, keeping the logic exactly the same. Again I tested the programs. This time, all the versions matched output (C++ accepted version, Java WA version, and C++ translated version). When I submitted my C++ file, it got accepted.

Given that my program was only about 70 lines, I know I translated it to C++ perfectly.

Also, to be noted, I compiled my JAVA file using gcj 2.96 (which is newer than the version used here) and ran the binary against all my test inputs and it matched perfectly.

So that's how I know the java compiler here is flawed. Users beware...!!

I haven't been able to find an older copy of gcj to try my program with it. :(

Also, this happened to me with SCUD BUSTERS. I rewrote my rejected program in C++ and it got accepted.

Agreed

Posted: Thu Sep 04, 2003 10:43 pm
by farsight
I agree w/ you. This has happened to me too. I got a C++ friend to translate my java code exactly! and it was accepted. I am also suspicious of some other WA I got, cause no other Java programmer solved it either.
This sucks.

Posted: Wed Oct 29, 2003 9:24 pm
by Carthage
Maybe they should replace the compiler with a newer version, or they should try Excelsior JET...

Posted: Sat Nov 22, 2003 1:47 am
by purinflash
Yes, the Java compiler is definitely not working properly, first, it doesn't support all methods; second, I also submitted a few Java programs but they all don't work, despite the fact that they are working perfectly with the same output as the sample given! :evil: