Discussion:
[Ikvm-developers] Differences in path handling in ikvmc DLL vs. Java jar execution
Paul Chambre
2016-11-18 19:39:34 UTC
Permalink
Hi folks,

I noticed some differences in file access from code within an ikvmc DLL vs.
that same code executed by Java from a jar.

One particular example is a properties file that is passed to one of our
classes with a -D.

Initially, whether local to the application (next to the jar/dll) or fully
qualified, the file was inaccessible to the jar code. I then added . to the
classpath in the manifest of the jar, and that allowed the jar code, when
run through Java -jar, to access properties files in the same directory as
the jar.However, this change did not help DLLs make with ikvmc from that
jar. Those dlls still cannot access the properties file when it's in the
same directory as the DLL (or fully qualified).

Are there other properties to be set specifically for ikvmc, to define the
classpath or other "local" path configurations?

Thanks,
Paul
Volker Berlin
2016-11-21 08:32:09 UTC
Permalink
It look like that your framework try to access the stream of
com.datastax.driver.core.Cluster$Builder.class. Because class resources
are not available IKVM that it try to generate a stub of the stream
which is failing. If this is the case then it look like a bug in IKVM.

Which version of IKVM do you use?

Volker
Post by Paul Chambre
Hi folks,
I noticed some differences in file access from code within an ikvmc
DLL vs. that same code executed by Java from a jar.
One particular example is a properties file that is passed to one of
our classes with a -D.
Initially, whether local to the application (next to the jar/dll) or
fully qualified, the file was inaccessible to the jar code. I then
added . to the classpath in the manifest of the jar, and that allowed
the jar code, when run through Java -jar, to access properties files
in the same directory as the jar.However, this change did not help
DLLs make with ikvmc from that jar. Those dlls still cannot access the
properties file when it's in the same directory as the DLL (or fully
qualified).
Are there other properties to be set specifically for ikvmc, to define
the classpath or other "local" path configurations?
Thanks,
Paul
------------------------------------------------------------------------------
_______________________________________________
Ikvm-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
Volker Berlin
2016-11-21 08:25:45 UTC
Permalink
.NET does not know the concept of the classpath. You need add references
to DLLs to your program. Or open a it via file API.

Volker
Post by Paul Chambre
Hi folks,
I noticed some differences in file access from code within an ikvmc
DLL vs. that same code executed by Java from a jar.
One particular example is a properties file that is passed to one of
our classes with a -D.
Initially, whether local to the application (next to the jar/dll) or
fully qualified, the file was inaccessible to the jar code. I then
added . to the classpath in the manifest of the jar, and that allowed
the jar code, when run through Java -jar, to access properties files
in the same directory as the jar.However, this change did not help
DLLs make with ikvmc from that jar. Those dlls still cannot access the
properties file when it's in the same directory as the DLL (or fully
qualified).
Are there other properties to be set specifically for ikvmc, to define
the classpath or other "local" path configurations?
Thanks,
Paul
------------------------------------------------------------------------------
_______________________________________________
Ikvm-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
Loading...