Re: Extending java.base module

2017-02-24 Thread Volker Simonis
On Wed, Feb 15, 2017 at 5:20 PM, Volker Simonis wrote: > > On Wed, Feb 15, 2017 at 5:16 PM, Alan Bateman wrote: > > On 15/02/2017 16:01, Daniel Fuchs wrote: > > > >> > >> In that specific case it's not java.base that depends > >> on java.security.jgss, but the application itself. > >> > >> So I w

Re: Extending java.base module

2017-02-15 Thread Volker Simonis
On Wed, Feb 15, 2017 at 5:16 PM, Alan Bateman wrote: > On 15/02/2017 16:01, Daniel Fuchs wrote: > >> >> In that specific case it's not java.base that depends >> on java.security.jgss, but the application itself. >> >> So I would expect the application code to either require >> java.security.jgss,

Re: Extending java.base module

2017-02-15 Thread Alan Bateman
On 15/02/2017 16:01, Daniel Fuchs wrote: In that specific case it's not java.base that depends on java.security.jgss, but the application itself. So I would expect the application code to either require java.security.jgss, or some higher level module for that itself requires java.security.jgss

Re: Extending java.base module

2017-02-15 Thread Daniel Fuchs
Hi Volker, On 15/02/17 15:52, Volker Simonis wrote: Hi Max, I'm not an jigsaw either, but wouldn't your solution break a tool like jlink? In other words, if an application uses your code and the developer uses jlink to create a run-time image, wouldn't that image fail to execute his applicatio

Re: Extending java.base module

2017-02-15 Thread Volker Simonis
Hi Max, I'm not an jigsaw either, but wouldn't your solution break a tool like jlink? In other words, if an application uses your code and the developer uses jlink to create a run-time image, wouldn't that image fail to execute his application because jlink fails to see that java.base depends on

Re: Extending java.base module

2017-02-15 Thread Alan Bateman
On 15/02/2017 13:21, Langer, Christoph wrote: Hi, thanks all for your very helpful comments. So I see that I cannot rely on my Service implementation at an early stage. But I can imagine that I query for the service provider and if it's not there I have to be able to live without it. The qu

RE: Extending java.base module

2017-02-15 Thread Langer, Christoph
t; From: Alan Bateman [mailto:alan.bate...@oracle.com] > Sent: Mittwoch, 15. Februar 2017 13:22 > To: David Holmes ; Langer, Christoph > ; Chris Hegarty ; > Weijun Wang > Cc: jigsaw-dev@openjdk.java.net > Subject: Re: Extending java.base module > > > > On 15/02/201

Re: Extending java.base module

2017-02-15 Thread Michael Rasmussen
> > E.g. if I need to register/reach my service already at the early stages of > JVM initialization, e.g. when a class java.lang.Thread gets initialized, > can I assume a service from my extension module would be available? > No. At that time only java.base classes can be loaded. If you look at th

Re: Extending java.base module

2017-02-15 Thread Alan Bateman
On 15/02/2017 12:10, David Holmes wrote: On 15/02/2017 8:03 PM, Langer, Christoph wrote: Hi Chris, Max, thanks for your quick answers. So the service approach seems to fit quite well. But can I assume that my service implementation will be available already at "bootstrap time" of the JDK?

Re: Extending java.base module

2017-02-15 Thread David Holmes
odule system is initialized much later. David - Thanks, Christoph -Original Message- From: Chris Hegarty [mailto:chris.hega...@oracle.com] Sent: Mittwoch, 15. Februar 2017 10:04 To: Weijun Wang Cc: Langer, Christoph ; jigsaw- d...@openjdk.java.net Subject: Re: Extending java.ba

Re: Extending java.base module

2017-02-15 Thread Alan Bateman
On 15/02/2017 08:36, Langer, Christoph wrote: Hi Jigsaw experts, as you might or might not know, we have an own JDK implementation with some extension code that is quite interwoven with the jdk. Now I'm looking into how this coding can be spread into a good module structure for jdk9. And I'm

RE: Extending java.base module

2017-02-15 Thread Langer, Christoph
To: Weijun Wang > Cc: Langer, Christoph ; jigsaw- > d...@openjdk.java.net > Subject: Re: Extending java.base module > > > > On 15 Feb 2017, at 08:51, Weijun Wang wrote: > > > > Disclaimer: I am not a jigsaw expert. > > > > The provides/

Re: Extending java.base module

2017-02-15 Thread Chris Hegarty
> On 15 Feb 2017, at 08:51, Weijun Wang wrote: > > Disclaimer: I am not a jigsaw expert. > > The provides/uses mechanism is certainly more formal, but you can also do > http://hg.openjdk.java.net/jdk9/dev/jdk/rev/d282c1a8d20b. This is, at best, a hack. The use of Services is a better approach

Re: Extending java.base module

2017-02-15 Thread Weijun Wang
Disclaimer: I am not a jigsaw expert. The provides/uses mechanism is certainly more formal, but you can also do http://hg.openjdk.java.net/jdk9/dev/jdk/rev/d282c1a8d20b. --Max On 02/15/2017 04:36 PM, Langer, Christoph wrote: Hi Jigsaw experts, as you might or might not know, we have an own

Extending java.base module

2017-02-15 Thread Langer, Christoph
Hi Jigsaw experts, as you might or might not know, we have an own JDK implementation with some extension code that is quite interwoven with the jdk. Now I'm looking into how this coding can be spread into a good module structure for jdk9. And I'm not a crack yet on using the module system thoug