Jonathan.Gibbons at Sun.COM
Mon Mar 15 11:23:52 PDT 2010
Mandy Chung wrote:
> On 03/15/10 07:31, Jonathan Gibbons wrote:
>> Mandy Chung wrote:
>>> Jonathan Gibbons wrote:
>>>> Thanks. Given an image, how can I tell what is in it? Are there
>>>> techniques that do not directly use jigsaw APIs? For example, if
>>>> jtreg is running on top of JDK 1.6, and is asked to run tests using
>>>> a JDK 1.7 image, can it look at the image to determine what classes
>>>> are available?
>>> There isn't necessarily a way. The module content layout is
>>> specific to the module library implementation. Like the simple
>>> library that puts all classes on disk in certain layout, the
>>> implementation might change. We could not count on the module
>>> content layout.
>>> Mark might have more to say about this.
>> jmod might give me what I want -- I can check the file system to see
>> if jmod exists, and if it does, I can then exec it query for specific
> That's right. I was too focus on the image layout and didn't
> consider tools. jmod would be the best tool to provide the information.
> Currently, jmod show -v will dump the list of classes but the output
> may be hard to parse. It works for a root module (i.e a module with
> the main entry point).
> What exactly do you need to find out from a given image? How is the
> info being used?
Mostly, I'm just trying to think ahead for jtreg. When presented with
an image, it needs to determine whether it can support compilation. In
the past, this was done by poking around for "jre/" and "tools.jar" and
stuff like that. Those may not exist in future, so I was trying to
figure out what jtreg might do. Note in particular that I would like
jtreg to remain somewhat version neutral, for versions >= 1.5. i.e the
same copy of jtreg should work for running tests on 1.5 or later.
More information about the jigsaw-dev