Using Java for the UTICPC

Created September 19, 1997

Yes, the UTICPC now supports Java. But we have some restrictions on its use, both for our convenience, and for fairness.

Date:	Thu, 18 Sep 1997 19:28:14 -0400
From:	Albert Yu Cheong LAI 
X-Sender: trebla@beaver.cs
Subject: (UTICPC) On Java

Just to get the news out quick.  We will allow Java after all.

Because of the peculiarity of Java and JVM, some minor conditions must
be imposed, to make the judges's lives easier.

1. For problem N, the (single) source file will bear the name
   pN.java, and the main() is in the public class pN, obviously.
   It will be compiled with the command "javac pN.java".

2. Thus, pN.class is the object file to run; more precisely, we run
   the program with "java pN < input > output".

3. In pN.java you may also define some non-public classes and
   interfaces of your own design.  The judges don't mind the extra
   *.class files thus generated.  If you know Java, you know why
   these extra classes and interfaces cannot be public.  (Hint:
   single source file.)

4. The JDK 1.1 API (the java.* class hierarchy) can be taken for
   granted.  I think they have a commercial name for that: Pure Java.
   Anyway, version 1.1.3, which is on CDF, including the java.* class
   hierarchy, will be used by the judges; although, I must mention in
   passing that Sun has just released 1.1.4.

5. To make these rules logically complete (yes I know Goedel's
   theorems), no *.class code other than those allowed above can be
   directly called.

You know that the last rule is needed if you are a Java hacker.  The
Java API contains a facility to dynamically load and execute any
*.class code; further, the Java API contains enough facility to fetch
any *.class code off the Internet.  (This is, in fact, how hotjava
and appletviewer work.  For example, appletviewer is actually a Pure
Java application that loads *.class codes and runs them.)

If I don't have rule 5, then rule 4 seems to allow you to borrow code
from outside, ("I am only calling some functions in the Java API,
ain't I?"), and we have a gray area.  Yet, under rule 5, you cannot
exercise your full right granted by rule 4...  Therefore, I proudly
announce that Goedel's theorems are not contravened. :)


David Neto
Fri Sep 19 11:00:02 EDT 1997