« Return to Thread: JRE classes services from netbeans modules (NB6.1)
Peter,
Interesting - you appear to be having the exact same problem as me (just sent an email to the list earlier today about it). It's just that in my case I am needing charsets that an included jar file is making the JVM aware of via a different entry under that jar's services directory.
Jesse's remark is right on target I believe, in that the jar you are using is expecting info contained in that services directory to still be accessed and relevant when the jar file is used in a netbeans app. However, entries in the services directory are found via the classLoader the current thread is using and when you use a NB suite app, that classLoader becomes seriously different. And, you found the same thing I did, which is that adding that jar as a wrapped module does not seem to correctly load into the jvm the entries from the "services directory.
Jesse, please assume this is the case for Peter's javax example, do you have solution for those cases where:
a) a third party jar file is to be included and used by a netbeans module suite app
b) that third party relies on entries in the META-INF/services directory to be set for the jar to operate correctly
c) sample apps with non-NB affected classLoaders work fine with the jar
d) when used in a NB project where the classLoader has been changed, the jar breaks
Do you have a solution for getting this type of situation to work correctly?
Best,
VictorOn Tue, May 13, 2008 at 9:18 PM, Peter Blemel <pblemel@...> wrote:
Hi,
It's not clear what this means to me. Is there a way to configure the module such that it is seen by the system class loader without resorting to adding it to the class path?
Thanks
Peter
----------------------------------------
> To: dev@...
> From: jesse.glick@...
> Date: Mon, 12 May 2008 19:18:03 -0700
> Subject: [openide-dev] Re: JRE classes services from netbeans modules (NB6.1)
_________________________________________________________________>
> Peter Blemel wrote:
>> I have a jar that provides services for javax.sound (via
>> META-INF/services). A little example main program (not in the jar
>> file) invokes javax.sound classes that use the services. Compiling
>> the example with javac and running java from the command line works
>> great. The javax.sound classes use the services from the jar file.
>>
>> I created a wrapper module for the jar and put an action in a module
>> to invoke the example. It compiles just fine, but when it runs the
>> javax.sound classes do not find / use the services from the wrapped
>> jar file.
>
> Perhaps the JavaSound impl looks for services only in the system class
> loader.
>
Windows Live SkyDrive lets you share files with faraway friends.
http://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_skydrive_052008
« Return to Thread: JRE classes services from netbeans modules (NB6.1)
| Free Forum Powered by Nabble | Forum Help |