Re: Why IKVM.NET reports types as missing when java does not?

Jeroen Frijters <[email protected]> Wed, 15 Apr 2015 06:33:37 +0000
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
Hi Seref,

In addition to what Volker said, the underlying reason is a fundamental difference between Java and .NET: In Java classes are the fundamental unit of deployment, whereas .NET uses assemblies. If ikvmc compiled each Java class to a different assembly, this problem wouldn't exist (but you'd have other problems, because .NET isn't designed to work with tens of thousands of assemblies).

Regards,
Jeroen

> -----Original Message-----
> From: Seref Arikan [mailto:[email protected]]
> Sent: Tuesday, April 14, 2015 18:26
> To: ikvm-developers
> Subject: [Ikvm-developers] Why IKVM.NET reports types as missing when
> java does not?
> 
> Greetings,
> I'm not sure if the subject is clear enough. When I use ikvmc.exe on a
> set of jars, I get a bunch class not found exceptions. As Jeroen points
> out in this stackoverflow answer, this is not always a problem:
> http://stackoverflow.com/questions/5256658/warning-in-converting-jar-
> file-into-dll-using-ikvm
> 
> What I'm curious about is: when a jar file I'm using is added to a java
> project, the java development environments I'm using give me no errors
> about missing types. When the same jar is fed to ikvmc.exe, I get the
> class not found errors. If my own java code is referring to a type that
> is not there, the java compiler(IDEs) catch it.
> 
> So how does ikvmc.exe traverse type dependencies? It is clearly
> different than the java compiler, since ikvmc.exe complains about
> missing types which are not reported as missing by the java compiler.
> 
> The reason I'm asking this is, I know for a fact that the jars I'm using
> can be used standalone in a java project, but ikvmc reports missing
> types. So can I assume that despite these warnings, .NET dlls generated
> from the jars would always work? (since they're guaranteed to work
> standalone under java?)
> 
> Regards
> Seref
> 
> ps: IKVM is  one of my favourite tools; I do hope it gets support from
> the recent open source .NET activities of Microsoft.
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF