can't build jigsaw with new javac
Jonathan Gibbons
Jonathan.Gibbons at Sun.COM
Wed Mar 10 09:58:05 PST 2010
Mandy,
For the immediate term, I'm still hoping we can get away with removing
-Xbootclasspath from that command. Long term, I don't think we can avoid
allowing and supporting -Xbootclasspath again, because we'll potentially
need access to those class files as soon as someone puts annotations in
the module-info files.
-- Jon
Jonathan Gibbons wrote:
> Mandy Chung wrote:
>> Jonathan Gibbons wrote:
>>> Mandy,
>>>
>>> It seems anomalous that there are two different values for
>>> -Xbootclasspath in the modularize target.
>>>
>>>>
>>>> /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/bin/javac -source
>>>> 7 -target 7 -encoding ascii
>>>> "-Xbootclasspath:/mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/classes"
>>>
>>>
>>>
>>
>> This is the value coming from $(JAVACFLAGS) that doesn't have some
>> classes from other jar files (sa-jdi.jar). If sa-jdi.jar is the only
>> missing jar file (I have to double check), I could use
>> -Xbootclasspath/a instead
>>>> -d /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/modules \
>>>>
>>>> -Xbootclasspath:/mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/tmp/modules/classes\
>>>>
>>
>> That's the value I want. I unjar all jdk jar files in
>> $outputdir/tmp/modules/classes as part of the modularization process.
>>
>> Since $outputdir/tmp/modules/classes has all the jdk classes, I took
>> the easiest approach to replace the entire bootclasspath with that.
>>
>> What about if I use
>> -J-Xbootclasspath:$outputdir/tmp/modules/classes? Would javac be
>> able to look up all jdk modules and compile all module-info.java?
>> Would that be a better temporary workaround for now?
>
> -J-Xbootclasspath means something completely different and affects the
> path used to find javac's own classes. Almost certainly, you don't
> mean that. Tomorrow I will look at removing -Xbootclasspath from the
> command line used for the modularize target, to see whether that is
> sufficient to fix the current problem.
>
> -- Jon
>
>>
>> Mandy
>>
>>>> -modulepath
>>>> /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/modules \
>>>> -sourcepath
>>>> /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/tmp/modules/src \
>>>>
>>>> /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/tmp/modules/src/*/module-info.java
>>>>
>>>> javac: cannot specify both -bootclasspath and -modulepath
>>>> Usage: javac <options> <source files>
>>>> use -help for a list of possible options
>>>
>>> One value comes in via $(JAVACFLAGS), the other is explicit.
>>>
>>> -- Jon
>>>
>>>
>>> Mandy Chung wrote:
>>>> On 03/09/10 12:16, Jonathan Gibbons wrote:
>>>>> Mandy,
>>>>>
>>>>> What are you trying to do here? You can't have -Xbootclasspath
>>>>> and -modulepath.
>>>>
>>>> That was a hack for javac to find classes that are not in the default
>>>> bootclasspath (e.g. lib/sa-jdi.jar).
>>>>
>>>> For example, $outputdir/tmp/modules/src/jsadebugd/module-info.java
>>>> has a main class of sun.jvm.hotspot.jdi.SADebugServer that is not
>>>> in $outputdir/classes
>>>>
>>>> Is there a better way to do this?
>>>>
>>>> Mandy
>>>>
>>>>>
>>>>>> /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/bin/javac
>>>>>> -source 7 -target 7 -encoding ascii
>>>>>> "-Xbootclasspath:/mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/classes"
>>>>>> -d /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/modules \
>>>>>>
>>>>>> -Xbootclasspath:/mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/tmp/modules/classes\
>>>>>>
>>>>>> -modulepath
>>>>>> /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/modules \
>>>>>> -sourcepath
>>>>>> /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/tmp/modules/src \
>>>>>>
>>>>>> /mnt/w/jjg/work/jigsaw/jigsaw/build/linux-amd64/tmp/modules/src/*/module-info.java
>>>>>>
>>>>>> javac: cannot specify both -bootclasspath and -modulepath
>>>>>> Usage: javac <options> <source files>
>>>>>> use -help for a list of possible options
>>>>>
>>>>> See this response from Mark back in December, available here:
>>>>> http://mail.openjdk.java.net/pipermail/jigsaw-dev/2009-December/000421.html
>>>>>
>>>>>
>>>>>> >/ -- do we allow or forbid any use of bootclasspath with any
>>>>>> modular code?
>>>>>> /
>>>>>> Forbid.
>>>>>>
>>>>>
>>>>>
>>>>> -- Jon
>>>
>>
>
More information about the jigsaw-dev
mailing list