Question on how to properly find all the sources going into a JDK
Andrew John Hughes
ahughes at redhat.com
Fri Apr 16 10:14:26 UTC 2010
On 15 April 2010 21:55, Martin Buchholz <martinrb at google.com> wrote:
> On Thu, Apr 8, 2010 at 12:40, Joe Darcy <Joe.Darcy at sun.com> wrote:
>> Hello.
>>
>> From time to time, I want to run an annotation processor over all the Java
>> sources going into the JDK. Annotation processors as compiler plug-ins can
>> be used to check various structural properties of the code. For example, an
>> annotation processor could be used to find potential methods to be converted
>> to use var-args.
>>
>> The goal is to ideally have a single command like
>>
>> javac -proc:only -processor MyProcessor $OTHER_OPTIONS `Long list of
>> files`
>>
>> and I wanted to verify the proper way to get the long list of files. From
>> the root of a JDK 7 forest with a build directory, does
>>
>> find corba/src \
>> jaxp/drop/jaxp_src \
>> jaxws/drop/jaxws_src \
>> langools/src \
>> jdk/src/share jdk/src/$OS \
>> $BUILDDIR/$PLATFORM/gensrc \
>> -name "*.java"
>>
>> cover all the files of interest?
>
> That looks pretty good;
> if you wanted to verify its accuracy,
> you could build a list of class files
> by running jar tf on the jar files in the
> images, and correlating with the results
> from running find on the source files
> as you did above.
>
> Martin
>
There are some Java sources in HotSpot as well; hence the need for
that patch last week with the source/target settings.
--
Andrew :-)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the build-dev
mailing list