Question: Restriction on non-empty directory on cass path

yumin qi yumin.qi at gmail.com
Wed Dec 13 05:33:46 UTC 2017


Ioi,
  The user has script to run their apps,  the script is large and setting
is little awkward. When use AppCDS, they modified the existing script and
failed here.
  So the solution is remove all such directories from class path.

Thanks
Yumin

On Tue, Dec 12, 2017 at 9:28 PM, Ioi Lam <ioi.lam at oracle.com> wrote:

> This was a design decision. CDS require any directories on the classpath
> to be empty (I think we really should discourage directories to be use in
> the classpath). The reason is that it's difficult to check whether the any
> class files have been added/modified/removed -- if we don't do such checks,
> then the program will load different classes depending on whether CDS is
> enabled.
>
> What's the reason for your users to append directories to the classpath?
>
> Thanks
>
> - Ioi
>
>
>
> On 12/12/17 9:18 PM, yumin qi wrote:
>
>> Hi,
>>
>>   The question is for CDS. When dump CDS using (tried with Ioi's AppCDS
>> patch)
>>   -Xshare:dump -XX:+UseAppCDS  -cp somedir:somedir/somefile.jar
>>
>>    if somedir does not contain any classes file, but other non class
>> files, it will fail here:
>>
>> ClassLoaderExt::add_class_path_entry(...):
>>          tty->print_cr("Error: non-empty directory '%s'", path);
>>          exit_with_path_failure("Cannot have non-empty directory in
>> boot/ext/app classpaths", NULL);
>>
>>    Why not just skip adding such class path entry? Will it fail on share
>> if those entries skipped?
>>    Is this a design behavior?
>>    User some time append such directories to class path, and will confuse
>> on such failure on CDS since it won't fail on non-CDS way.
>>     Any inputs really appreciated.
>>
>>   Thanks
>>   Yumin
>>
>
>


More information about the hotspot-dev mailing list