Regression in JDK8 build 78: javac complains about missing Class#isAnnotationPresent

Uwe Schindler uschindler at apache.org
Fri Mar 1 02:22:17 PST 2013


Hi Joel,

I already had a similar cool idea to achieve the same and in addition reduce the size of rt.jar: One could write a tool that reads any older rt.jar, extracts all class files (like animal-sniffer does to collect method signatures), and then transforms them using asm or javassist: The tramsformation would be to remove all method bodies and replace by stubs (e.g. "return null",....). The class file version and other attributes would not be changed, just method bodies stripped and internal classes like sun.misc.* removed. It would then be possible to use this tiny, signature-only JAR file as bootclasspath for javac and javadoc. This one could be released in Maven so code can use it to really cross compile. I am not sure about the legal implications, but as far as I remember the signatures are not protected by copyright or GPL, only the implementations - but I amy be wrong.

Such a tool would be very easy to create with ASM/javassist.

Uwe

-----
Uwe Schindler
uschindler at apache.org 
Apache Lucene PMC Member / Committer
Bremen, Germany
http://lucene.apache.org/

> -----Original Message-----
> From: Joel Borggrén-Franck [mailto:joel.franck at oracle.com]
> Sent: Friday, March 01, 2013 10:53 AM
> To: Uwe Schindler
> Cc: 'Joe Darcy'; compiler-dev at openjdk.java.net; lambda-
> dev at openjdk.java.net; 'Robert Muir'
> Subject: Re: Regression in JDK8 build 78: javac complains about missing
> Class#isAnnotationPresent
> 
> Hi Uwe,
> 
> On 03/01/2013 09:44 AM, Uwe Schindler wrote:
> 
> >
> >Again, if older
>  > rt.jar files would be accessible as artifacts on Maven Central,
> > this would be obsolete, too.
> >
> >
> 
> Sounds like a neat idea, here are the OpenJDK 6 sources:
> http://hg.openjdk.java.net/jdk6/jdk6
> 
> It isn't trivial to compile but should work on a not too bleeding edge system. I
> don't think the fact that this isn't the RI will have any practical impact on this
> idea. Also if you do this for 7 later at least the RI was compiled from the
> OpenJDK sources [1].
> 
> I don't use Maven and I'm not a lawyer but I'm sure someone can figure out a
> way to provide this service to their fellow developers while complying with
> the GPL.
> 
> cheers
> /Joel
> 
> [1] http://blogs.oracle.com/henrik/entry/moving_to_openjdk_as_the



More information about the lambda-dev mailing list