Not able to load files from ClassPath

View: New views
2 Messages — Rating Filter:   Alert me  

Not able to load files from ClassPath

by Nitin G :: Rate this Message:

| View Threaded | Show Only this Message

Dear All,
 
I have converted a Java jar to Dll using ikvm 0.46.
 
I am not able to load file from classpath . I use the following code to load file
 
Configuration.class.getResourceAsStream(file);

Can someone suggest ?
 Thanks & Regards,
Nitin Gupta
 
 


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

Re: Not able to load files from ClassPath

by Jeroen Frijters :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

Try ikvmc compiling the jar that contains the Configuration class with the "-classloader:ikvm.runtime.ClassPathAssemblyClassLoader" option. That will allow the assembly class loader for that dll to load resources from the CLASSPATH.

Regards,
Jeroen

> -----Original Message-----
> From: Nitin Gupta [mailto:nitin_sunjava@...]
> Sent: Monday, March 14, 2011 8:58 AM
> To: ikvm-developers@...
> Subject: [Ikvm-developers] Not able to load files from ClassPath
>
> Dear All,
>
> I have converted a Java jar to Dll using ikvm 0.46.
>
> I am not able to load file from classpath . I use the following code to
> load file
>
> Configuration.class.getResourceAsStream(file);
>
> Can someone suggest ?
>
>  Thanks & Regards,
> Nitin Gupta
>
>


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers