[updated] Ant compiler adapter for JSR14 and JSR201 (ala the early-access compiler 2.0-ea)

# 2003-06-19 16:56:22 -0400 | Java | 3 Comments

A couple of months ago, I posted an adapter for Ant that allowed you to use your plain-old Ant files to compile Java code using Sun’s early-access compiler.

Well, Sun have released 2.0-ea of that early-access compiler; which adds support for the JSR201 syntactic sugar. It also breaks my compiler adapter, so I’ve had to update the adapter.

This version supports the 2.0-ea and 1.3-ea early-access releases. Big thanks to Johhny L and Jeremy D. Frens for their patches.

Downloads

Instructions

Read the “quick start” and “a more detailed example” sections on this page (I’m hosting the adapter on the Clover site now… Clover has some preliminary support for Generics).

3 Responses to this entry:

  1. Anonymous Coward Says:

    I get a
    java.lang.NoSuchMethodError: java.util.List.iterator()Ljava/lang/SimpleIterator
    error
    I added the gjc-rt.jar to the classpath.
    Any ideas?

    Another thing:
    The early-access compiler 2.0-ea has no autoboxing, right?

  2. Matt Quail Says:

    I will have to look into that error, probably over this weekend.

    I think 2.0-ea does have autoboxing (if you look at examples/Test.java in the 2.0-ea zip, you can see the ‘varargs boxing’ happening; but I don’t know if autoboxing is limited to this in 2.0-ea)

  3. Anonymous Coward Says:

    Yeah, saw that, but only works "one way".
    List list = new LinkedList<Integer>();

    list.add(1); //works
    int i = list.get(0); // doesn’t work

    Map<Integer, String> m = new TreeMap<Integer, String>();
    m.put(1, "one"); //doesn’t work

Leave a Reply

Click here to leave a reply