RFR [JEP 220] Modular Run-Time Images
Mandy Chung
mandy.chung at oracle.com
Mon Dec 1 20:13:12 UTC 2014
On 12/1/14 10:38 AM, harold seigel wrote:
> Hi Chris,
>
> Does this addition to hotspot/src/share/vm/runtime/arguments.cpp mean
> that all jar files must end in ".jar" ?
>
In practice, is there any JAR file installed in the extension/endorsed
directory with a different file extension than ".jar"? This addition is
to be used by -XX:+CheckEndorsedAndExtDirs flag to help identity if the
application is using endorsed/extension mechanism.
The other way to determine this is by opening the file and accept
any zip file. That could be done while I think it's rare to find
any use of extension and endorsed mechanism with JAR files without
".jar" file extension.
Mandy
> +static bool has_jar_files(const char* directory) {
> + DIR* dir = os::opendir(directory);
> + if (dir == NULL) return false;
> +
> + struct dirent *entry;
> + char *dbuf = NEW_C_HEAP_ARRAY(char,
> os::readdir_buf_size(directory), mtInternal);
> + bool hasJarFile = false;
> + while (!hasJarFile && (entry = os::readdir(dir, (dirent *) dbuf))
> != NULL) {
> + const char* name = entry->d_name;
> + const char* ext = name + strlen(name) - 4;
> *+ hasJarFile = ext > name && (os::file_name_strcmp(ext, ".jar") ==
> 0);*
> + }
> + FREE_C_HEAP_ARRAY(char, dbuf, mtInternal);
> + os::closedir(dir);
> + return hasJarFile ;
> +}
>
> Thanks, Harold
>
>
> On 11/20/2014 4:41 PM, Chris Hegarty wrote:
>>> From: Chris Hegarty <chris.hegarty at oracle.com>
>>> Subject: RFR [JEP 220] Modular Run-Time Images
>>> Date: 20 November 2014 21:39:14 GMT
>>> To: jigsaw-dev <jigsaw-dev at openjdk.java.net>, jdk9-dev
>>> <jdk9-dev at openjdk.java.net>, build-dev <build-dev at openjdk.java.net>,
>>> Alan Bateman <alan.bateman at oracle.com>, Alex Buckley
>>> <alex.buckley at oracle.com>, Chris Hegarty <chris.hegarty at oracle.com>,
>>> Erik Joelsson <erik.joelsson at oracle.com>, Jonathan Gibbons
>>> <jonathan.gibbons at oracle.com>, Karen Kinnear
>>> <karen.kinnear at oracle.com>, "Jim Laskey (Oracle)"
>>> <James.Laskey at oracle.com>, Magnus Ihse Bursie
>>> <magnus.ihse.bursie at oracle.com>, Mandy Chung
>>> <mandy.chung at oracle.com>, Mark Reinhold <mark.reinhold at oracle.com>,
>>> Paul Sandoz <paul.sandoz at oracle.com>, "A. Sundararajan"
>>> <sundararajan.athijegannathan at oracle.com>
>>>
>>> This is a review request for the changes for JEP 220: Modular
>>> Run-Time Images [1].
>>>
>>> There are a number of individuals responsible for these changes.
>>> Some, possibly not all, are explicitly listed in the 'To' section of
>>> this mail, and they will help address any comments arising from this
>>> review request.
>>>
>>> The new run-time image structure is defined in JEP 220 [1], and can
>>> be seen as a result of building the staging forest [2], or in the
>>> early access builds [3].
>>>
>>> Webrevs:
>>> http://cr.openjdk.java.net/~chegar/8061971/00/
>>>
>>> Due to the significant impact of these changes, a JDK 9 promotion
>>> has been tentatively reserved for their integration. All comments
>>> are welcome, although given the nature of the changes then we might
>>> have to create separate issues in JIRA to address some of them later
>>> in jdk9/dev.
>>>
>>> -Chris.
>>>
>>> [1] http://openjdk.java.net/jeps/220
>>> [2] http://hg.openjdk.java.net/jigsaw/m2/
>>> [3] http://openjdk.java.net/projects/jigsaw/ea
>
More information about the jdk9-dev
mailing list