Page 1 of 1

Compile error

Posted: Mon Mar 06, 2006 2:08 am
by Tritri
Hi, I'm a beginner and I'm trying to submit a problem and always get the same 'Compilation Error' response from the Judge.

I try to write a simple Hello World program but the result was the same. Do you know if there is a problem with the compiler or I don't know to write a HW program?


Posted: Mon Mar 06, 2006 5:40 am
by Darko
If you looked around, you would've (eventually) figured out that UVa supports a reduced Java 1.1 (no java.math.*,* is restricted, that sort of thing...)

Then there is this thing - your file MUST be called containing a class Main (that MUST NOT be public).

More about it here (note that they don't support a single 1.2 feature, no idea what they mean by that line):
and here:

So, if you are planning to use Java here, I suggest geting 1.1 docs. Yes, Java has come a long way since then, but they have some reason for using it (they actually use gcj 2.95 - I know, I have no idea either).


Posted: Mon Mar 06, 2006 10:04 am
by Tritri
I don't know that the file must called
Now the program compiles, but I get 'Time exceeded limit', supose it's a problem reading input. I will investigate that.

Thanks you Darko.

Posted: Sun Mar 12, 2006 7:25 pm
by Tritri
How can be that:


returns compile error, and:

Stack sss = stack;

works ??

Posted: Mon Mar 13, 2006 5:29 am
by Darko
Well, you just learned another quirk of the gcj 2.95 :)

So, you know what to look for the next time you get a Compile Error.

Just for heads up - if you get a Wrong Answer, it's not necessarily a wrong answer, it might be a Runtime Error (not reported for Java, and, from what I understand, doesn't get reported for PASCAL either).