Re: [Ikvm-developers] Mapping toString, hashCode and equals
Brought to you by:
jfrijters
From: Markus B. <mar...@go...> - 2009-12-14 19:28:52
|
Hi! Well, I'm not finished, yet, but I have some results I can post: 0. I created a simple HelloWorld.jar and converted it with IKVM. 1. Then I merged the HelloWorld.dll with the IKVM.Runtime and the IKVM.OpenJDK.Core assemblies. 2. I used the merged assembly in a .NET application 2.1. I get an error when I use ToString on a object (I will add the bug report right at the end of my mail) 3. I patched the merged assembly using the Reflexil-Tool (I just turned the visibility attribute of the notify, notifyAll and wait-methods in java.lang.Object to "internal"). 4. I used the patched assembly in my .NET application 4.1. The notify, notifyAll and wait-methods were gone! :) So far, I think I have to merge more assemblies to get this thing running! In VisualStudio, I did not see the notify, notifyAll and wait-methods! :) That's exactly what I wanted to achieve. I only merged the Runtime and OpenJDK.Core. And if I add more assemblies, this may do the trick... Perhaps you can point me some important assemblies that IKVM uses during Runtime?! Regards, Markus Bischof Here comes the Bug-Report (don't forget: This is a failure thrown out of the merged assembly, which has no access to any IKVM assemblies, I think it's really ok that there comes an error!): --------------------------- IKVM.NET 0.0.0.0 Critical Failure --------------------------- ****** Critical Failure: Failed to find core classes in core library ****** PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE (on Windows you can use Ctrl+C to copy the contents of this message to the clipboard) at IKVM.Internal.JVM.CriticalFailure(String message, Exception x) at IKVM.Internal.ClassLoaderWrapper.LoadRemappedTypes() at IKVM.Internal.ClassLoaderWrapper..cctor() at IKVM.Internal.ClassLoaderWrapper.IsRemappedType(Type type) at IKVM.NativeCode.ikvm.runtime.Util.GetTypeWrapperFromObject(Object o) at IKVM.NativeCode.ikvm.runtime.Util.getClassFromObject(Object o) at ikvm.runtime.Util.getClassFromObject(Object obj) at java.lang.Object.instancehelper_getClass(Object this) at java.lang.Object.toStringImpl(Object param0) at java.lang.Object.toString() at java.lang.Object.ToString() at ConsoleApplication1.Program.Main(String[] args) in ...\Program.cs:line 15 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Am 06.12.2009 um 09:54 schrieb Jeroen Frijters: > Hi Volker, > > It's not exactly hardcoded. In map.xml when you override a method in System.Object with different name, ikvmc assumes that you want to hide the original method. > > Regards, > Jeroen > >> -----Original Message----- >> From: Volker Berlin [mailto:vol...@go...] >> Sent: Saturday, December 05, 2009 6:49 PM >> To: ikv...@li... >> Subject: Re: [Ikvm-developers] Mapping toString, hashCode and equals >> >> Hi Jeroen, >> >>> What development environment do you use? In Visual Studio (with C#) I >>> don't see the GetHashCode, ToString and Equals methods (because >>> java.lang.Object explicitly hides these methods). >> >> Are this hides hardcoded? I can not see it in the map.xml for >> java.lang.Object. I can it see on java.lang.Throwable. >> >> Volker >> >> >> ----------------------------------------------------------------------- >> ------- >> Join us December 9, 2009 for the Red Hat Virtual Experience, a free >> event focused on virtualization and cloud computing. >> Attend in-depth sessions from your desk. Your couch. Anywhere. >> http://p.sf.net/sfu/redhat-sfdev2dev >> _______________________________________________ >> Ikvm-developers mailing list >> Ikv...@li... >> https://lists.sourceforge.net/lists/listinfo/ikvm-developers > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers |