jigsaw now sync'ed with jdk8-b23

Ludovic HOCHET lhochet at gmail.com
Sat Feb 4 14:07:30 PST 2012


Hello Mandy,
You understood correctly. This was the module-info.java that I had when I
published the post.

Ludovic

On Fri, Feb 3, 2012 at 00:22, Mandy Chung <mandy.chung at oracle.com> wrote:

> Ludovic,
>
> If I understand correctly, you get the NoClassDefFoundError
> if you have this module-info.java (that doesn't have
> "requires jdk.base"):
>
> module lh.worldclock.application @ 0.7
> {
>  requires jdk.desktop;
>  requires lh.worldclock.panel @ 0.7;
>  class lh.worldclock.WorldClock;
> }
>
> There are two things on our todo list that are relevant
> to this known issue.
> 1) jdk.desktop should re-export jdk.base so that
>   your app only needs to say "requires jdk.desktop".
> 2) requires jdk.base will be synthesized by javac if not
>   specifed in the module-info.java file [1]. Jon already
>   has the javac change.  Once we get the jigsaw runtime
>   change ready, we will push it to jigsaw forest and that
>   will address this issue.
>
> So for now, you would need to workaround it by specifying
> "requires jdk.base" as you have done.
>
> Thanks
> Mandy
> [1] http://cr.openjdk.java.net/~**mr/jigsaw/notes/jigsaw-big-**picture-01<http://cr.openjdk.java.net/%7Emr/jigsaw/notes/jigsaw-big-picture-01>
>
>
>
> On 2/2/2012 2:46 PM, Ludovic HOCHET wrote:
>
>> Today's change fixed that issue, thanks, so I went on rechecking my
>> Worldclock toy application [1] and got:
>> Exception in thread "main" java.lang.**NoClassDefFoundError:
>> java/lang/Object
>>    at java.lang.ClassLoader.**defineClass1(Native Method)
>>    at java.lang.ClassLoader.**defineClass(ClassLoader.java:**791)
>>    at java.security.**SecureClassLoader.defineClass(**
>> SecureClassLoader.java:142)
>>    at java.lang.module.**ModuleClassLoader.defineClass(**
>> ModuleClassLoader.java:49)
>>    at org.openjdk.jigsaw.Loader.**finishFindingClass(Loader.**java:240)
>>    at org.openjdk.jigsaw.Loader.**findClass(Loader.java:184)
>>    at org.openjdk.jigsaw.Loader.**loadClass(Loader.java:115)
>>    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**356)
>>    at sun.launcher.LauncherHelper.**checkAndLoadMain(**
>> LauncherHelper.java:482)
>> Caused by: java.lang.**ClassNotFoundException: java.lang.Object :
>> requested by +lh.worldclock.application
>>    at org.openjdk.jigsaw.Loader.**loadClass(Loader.java:113)
>>    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**356)
>>    ... 9 more
>>
>> This seemed to call for a missing jdk.base, and indeed adding it fixed
>> the issue (along with doing the same in the panel as well as exporting the
>> required package).
>>
>> Is it now necessary to explicitely require jdk.base?
>>
>> Ludovic
>>
>> [1]: http://lhochet.blogspot.com/**2012/01/jigsaw-worldclock-**
>> with-maven-plugin.html<http://lhochet.blogspot.com/2012/01/jigsaw-worldclock-with-maven-plugin.html>
>>
>> On Wed, Feb 1, 2012 at 00:49, Mandy Chung <mandy.chung at oracle.com<mailto:
>> mandy.chung at oracle.com**>> wrote:
>>
>>    On 1/31/2012 2:07 PM, Ludovic HOCHET wrote:
>>
>>        Hello,
>>        I tried building the latest source, but I'm having the
>>        following when
>>        trying to launch jconsole:
>>
>>
>>    Thanks for reporting it.
>>
>>        ludovic at jigsaw-vm:~/dev/**jigsaw$ export
>>        JIG=~/dev/jigsaw/build/linux-**i586/jdk-module-image
>>        ludovic at jigsaw-vm:~/dev/**jigsaw$ $JIG/bin/java -m jdk.jconsole
>>        Exception in thread "main" java.util.**ServiceConfigurationError:
>>        sun.java2d.pipe.**RenderingEngine: Provider
>>        sun.java2d.jules.**JulesRenderingEngine not found
>>
>>
>>    This depends on the services support that Alan is working on [1].
>>      The service loader is not yet module-aware.  Prior to the module
>>    views and exports change, all public types including
>>    sun.java2d.jules.**JulesRenderingEngine are exported and that's why
>>    it was working previously.
>>
>>    sun.java2d.pipe.**RenderingEngine calls ServiceLoader.loadInstalled
>>    method to create a new service loader using the extension class
>>    loader.  In module mode, there isn't any extension class loader
>>    but instead it should use the caller's module loader.
>>
>>    Alan, what do you think to integrate the change you have in the
>>    ServiceLoader class that uses the proper module loader in module
>>    mode first?   I think that can be separated from the services work.
>>
>>    Mandy
>>    [1]
>>    http://mail.openjdk.java.net/**pipermail/jigsaw-dev/2011-**
>> December/001819.html<http://mail.openjdk.java.net/pipermail/jigsaw-dev/2011-December/001819.html>
>>
>>
>>
>>
>> --
>> Ludovic
>> ------------------------------**-----------
>>
>> "Les formes qui differencient les etres importent peu
>>  si leur pensees s'unissent pour batir un univers..."
>>  Yoko Tsuno (in 'Les titans' by Roger Leloup)
>>  [The shapes that differenciate beings are not important
>>  if their thoughts unite to build a universe]
>>
>>


-- 
Ludovic
-----------------------------------------

"Les formes qui differencient les etres importent peu
 si leur pensees s'unissent pour batir un univers..."
 Yoko Tsuno (in 'Les titans' by Roger Leloup)
 [The shapes that differenciate beings are not important
 if their thoughts unite to build a universe]



More information about the jigsaw-dev mailing list