Re: [Ikvm-developers] IKVM .Net Question
Brought to you by:
jfrijters
|
From: Jeroen F. <je...@su...> - 2011-01-02 17:38:33
|
You need to make sure that your main executable directly references the dll that contains com.filenet.api.util.WSILoginModule. Note that adding a reference in Visual Studion isn't sufficient (because the compiler optimizes that away). The most reliable way is to add something like this to your main executable: GC.KeepAlive(typeof(com.filenet.api.util.WSILoginModule)) Regards, Jeroen > -----Original Message----- > From: Rick K. Sherman [mailto:rsh...@ec...] > Sent: Sunday, January 02, 2011 3:42 PM > To: Volker Berlin; Ikv...@li... > Subject: Re: [Ikvm-developers] IKVM .Net Question > > Thanks Volker. I've compiled the DLL with no special command line for > classloader. > What do you think I need to do exactly? Please give me a command line > that you think will work. > > How do I set the context classloader before I call the first class? > > There was a similar post to mine and Jeroen said it should "just work". > There was no resolution posted. > http://sourceforge.net/mailarchive/forum.php?thread_name=0531A9A1FC1DFB4 > 0B85BEA65CCBEEB7DED3AD836%40cosmail01.lsi.com&forum_name=ikvm-developers > > > Thanks > > ________________________________ > > From: Volker Berlin [vol...@go...] > Sent: Wednesday, December 29, 2010 11:17 AM > To: Rick K. Sherman; Ikv...@li... > Subject: AW: [Ikvm-developers] IKVM .Net Question > > > I think the problem is that a reference will be resolve at runtime with > a Class.forName() and not at compiler time. Without a stacktrace I am > not 100% sure. In this case it is important with which classloader do > you have compiled it. > > http://sourceforge.net/apps/mediawiki/ikvm/index.php?title=ClassLoader > > In some cases it can also be helpful to set a context classloader before > you call the first class. This is needed if only the context classloader > is used for Class.forName(). > > Volker > > > ________________________________ > > Von: Rick K. Sherman [mailto:rsh...@ec...] > Gesendet: Mittwoch, 29. Dezember 2010 17:27 > An: Ikv...@li... > Betreff: [Ikvm-developers] IKVM .Net Question > > > Hi, > > I have a set of .Jar files that I have converted into a .NET DLL > using IKVMC. > > I created a windows console application and reference the .NET DLL > (Called JavaBridge.DLL). I then call a method foo(), everything works > as expected. > > If I create a windows console application that references a DLL > which in turn references the JavaBridge.DLL, I receive an error which in > effect is telling me that there is some code that is unable to find a > file (which I believe was originally in one of the .Jar files I > converted.) > > The error message is: > javax.security.auth.login.LoginException: unable to find > LoginModule class: com.filenet.api.util.WSILoginModule > > > Why would a DLL referencing another DLL cause an issue? > > Hope this makes sense. > > Any ideas? > > > Thanks, > Rick |