Why does 'javac' still support "-Xbootclasspath" in jdk9 ?
Volker Simonis
volker.simonis at gmail.com
Wed May 3 19:02:58 UTC 2017
Sure, but for this we have the standard "-bootclasspath" option.
Why do we need to additionally keep the unsupported "-Xbootclasspath"
versions? I think that's just confusing (by the way, they always have
been confusing :)
Also, I don't see how "-Xbootclasspath/p" and "-Xbootclasspath/a"
would make any sense on Java 9?
On Wed, May 3, 2017 at 6:07 PM, Jonathan Gibbons
<jonathan.gibbons at oracle.com> wrote:
> Volker,
>
> Options to set the platform class path are still reasonable to use in
> conjunction with -target N, for older values of N. javac will give an error
> if you try and use these options when compiling for a version that supports
> modules (i.e. 9 or greater.)
>
> -- Jon
>
>
>
> On 5/3/17 1:33 AM, Volker Simonis wrote:
>>
>> Hi,
>>
>> I've just realized, that in jdk9, javac still supports the following
>> three non-standard options:
>>
>> -Xbootclasspath:<path> Override location of bootstrap class files
>> -Xbootclasspath/a:<path> Append to the bootstrap class path
>> -Xbootclasspath/p:<path> Prepend to the bootstrap class path
>>
>> In jdk9, only "-Xbootclasspath/a:<path>" is still supported by the
>> standard "java" launcher. The other two versions have been removed
>> from "java".
>>
>> For "javac", the "-Xbootclasspath" options have a different semantics
>> anyway - they don't specify the location of the bootstrap class files
>> for the compiler, but the location where the compiler finds the
>> bootstrap classes for the sour code it compiles. Therefore they are
>> only meaningful in combination with the -source/-target option.
>>
>> Now jdk9 comes with a new "--release" option, which doesn't require a
>> boot class path anymore. Additionally, "javac" supports the standard
>> "-bootclasspath" option since long time and it is the recommended way
>> of setting the boot class path if using the -source/-target option
>> ("-Xbootclasspath:<path>" is actually mapped to "-bootclasspath"
>> internally).
>>
>> Wouldn't it therefore make sense to completely remove the three
>> non-standard versions of the "-Xbootclasspath" option from "javac" in
>> jdk9?
>>
>> Thank you and best regards,
>> Volker
>
>
More information about the jdk9-dev
mailing list