Re: [Ikvm-developers] MissingResourceException
Brought to you by:
jfrijters
From: Hulquest, K. <Kev...@ls...> - 2010-09-14 13:23:31
|
Thank you for the quick response Jeroen. I was up against a deadline so I worked around the behavior by internalizing the properties as static final strings. I'll get some time here in a few weeks to pull down the source and investigate further. I'll let you know what I find. +Kevin >-----Original Message----- >From: Jeroen Frijters [mailto:je...@su...] >Sent: Thursday, September 09, 2010 8:17 AM >To: Hulquest, Kevin; ikv...@li... >Subject: RE: MissingResourceException > >Hi, > >This should "just work", but it could be that the code is using the wrong class >loader (i.e. the system class loader, instead of the class loader for the class that >the resource belongs to). > >Since you're from @lsi.com and the code as well, I assume you have access to >the source. Can you take a look and see how it loads the resource? > >Regards, >Jeroen > >> -----Original Message----- >> From: Hulquest, Kevin [mailto:Kev...@ls...] >> Sent: Thursday, September 09, 2010 3:22 PM >> To: ikv...@li... >> Subject: [Ikvm-developers] MissingResourceException >> >> Hello - I am running into a problem accessing properties files embedded >> in a jar file. My translated dll can be accessed by a standalone c# >> executable. I only see the problem when I access the library from >> another c# library (via powershell). >> >> When I catch the exception on the .NET side, I can see the following >> (InnerException): >> The type initializer for 'com.lsi.apps.scom.Resource' threw an >> exception. >> java.util.MissingResourceException: Can't find bundle for base name >> com/lsi/apps /scom/InfoStrings, locale en_US >> >> And the stack trace ends with: >> at com.lsi.apps.scom.Resource.getString(String key) >> >> With a disassembly tool I can see the properties are listed in the >> assembly but I can't seem to get at them with the library. >> >> I have tried combining my 3 jar files into one ikvmc call (to one >> instead of three output dlls) but I get the same result. Standalone >> exe works fine but the library does not. >> >> Do I need to specify the -resource flag? If so is there an example of >> the usage? I have tried several different combinations but I am not >> sure how to complete the name=path token. >> >> +Kevin >> >> >> ------------------------------------------------------------------------ >> ------ >> This SF.net Dev2Dev email is sponsored by: >> >> Show off your parallel programming skills. >> Enter the Intel(R) Threading Challenge 2010. >> http://p.sf.net/sfu/intel-thread-sfd >> _______________________________________________ >> Ikvm-developers mailing list >> Ikv...@li... >> https://lists.sourceforge.net/lists/listinfo/ikvm-developers |