Jigsaw classpath mode support
Alan Bateman
Alan.Bateman at oracle.com
Thu Aug 16 08:05:16 PDT 2012
On 15/08/2012 23:04, Mandy Chung wrote:
> :
>
>> One thing that I can't tell from the changes is the value of the
>> sun.boot.module.classpath property. That might be clear once Karen
>> publishes the hotspot changes. I ask because I can't tell if
>> Package.SystemPackage.isPackageFromModule is right, meaning whether
>> JVM_GetSystemPackage returns the value of sun.boot.module.classpath
>> for packages in the system modules.
>>
> Yes, JVM_GetSystemPackage will return the value of
> sun.boot.module.classpath for packages in the system modules. It's a
> simple way to tag a package in the system module.
Okay, that's what I thought (it caught my eye because I thought that
JVM_GetSystemPackage was expected to return a specific path or filename
rather than a classpath).
>
>> In Launcher. ExtClassLoader there is code to split the extension
>> directory into the paths that come before and after the default
>> location. I think I need help in understand why someof this is needed
>> because if someone sets java.ext.dirs then it should be a complete
>> override?
>>
>
> It's for searching native libraries from the module image or
> user-specified ext dir. The ExtClassLoader overrides the findLibrary
> method. The java.ext.dirs can be overridden in the command line; if
> not set, the VM will set its value to the default ext dirs. In
> addition, someone can set java.ext.dirs to include JAVA_HOME/lib/ext
> plus other additional directory. If the default ext dir is inclued
> in the java.ext.dirs, ExtClassLoader needs to locate the native
> library from the module image and loads a native library from each
> directory specified in the property value before and after the default.
Thanks, the bit I was missing here was the possibility that someone
might run with java.ext.dirs set to include the legacy ext directory.
In that case, shouldn't the check on L220 be <= index so that the
extensions directory ends up in prepaths rather than postpaths. That way
it will search the legacy location before looking in the module directory.
-Alan.
More information about the jigsaw-dev
mailing list