Re: [Ikvm-developers] IKVM can not cast sun.awt.image.ToolkitImage to java.awt-image.BufferedImage
Brought to you by:
jfrijters
|
From: Volker B. <vol...@go...> - 2012-02-03 22:06:10
|
Hi Vito, I have fix 2 bugs in IKVM. A snapshot can you find at http://www.file-upload.net/download-4084654/IKVM.zip.html or build it from repository. Please test it. With my very short test it has work. Volker Am 02.02.2012 11:35, schrieb Vito Smolej: > Apologies first, if this is the wrong place to ask for help (redirect > me pls, if this is so). > > I have been looking for possible causes of the problem below quite > extensively, but the few cases, where "ClassCastException: > /sun/./awt/./image/./ToolkitImage/ /cannot be cast to ..."/ was > mentioned, were not helpful insofar code changes have been suggested - > and I have an inkling, the problem should be simpler to solve. > > I am trying to run ImageJ (http://rsbweb.nih.gov/ij/) using ikvm and > I get the following exception and post-mortem: > > /D:\Data\ikVlll-7.0.4H5.0\bin>ikvm -jar ij.jar > Exception in thread "main" java.lang.ClassCastException: Das Objekt > des Typs > sun.awt.image.ToolkitImage kann nicht 1n Typ java.awt.image.BufferedImage > umgewandelt werden. > > at cli.system.Windows.Forms.Control.MarshaledInvoke(Unknown Source) > at cli.system.Windows.Forms.Contro1.Invoke(Unknown Source) > at cli.System.Windows.Forms.Control.Invoke(Unknown Source) > at cli.ikvm.awt.NetToolkit.Invoke(Unknown Source) > at cli.ikvm.awt.NetToolkit.createFrame(Unknown Source) > at java.awt.Frame.addNotify(Frame.java:477) > at java.awt.window.pack(Window.java:806) > at ij.lmageJ.<init>(ImageJ.java:165) > at ij.ImageJ.main(ImageJ.java:563)/ > > The IKVM version is as follows: > > /IKVM.NET <http://IKVM.NET> Launcher version 7.0.4335.0 > Copyright (C) 2002-2011 Jeroen Frijters > http://www.ikvm.net/ > > CLR version: 2.0.50727.3625 (32 bit) > mscorlib: 2.0.0.0 > ikvm: 7.0.4335.0 > mscorlib.resources: 2.0.0.0 > yst_: 2.0.0.0 > IKVM.OpenJDK.Core: 7.0.4335.0 > IKVM.Runtime: 7.0.4335.0 > System Configuration: 2.0.0.0 > System.Xml: 2.0.0.0 > OpenJDK version: OpenJDK 7 b147 / > > ___________________ > > OS: windows XP 32bit > .NET 4 version > ____________________ > > I have an identical problem with another ikvm version (0.46.01) and > OpenJDK version (OpenJDK 6 b22). I used ikvmc in this environment to > create ij.dll. It behaves decently in my environment (.net 4, Visual > Studio 2010, c#) except when it comes to creating the GUI - nothing > going on. I added IKVM.OpenJDK.SwingAWT assembly to references (to > silence some "unsatisfied" grumbles;) , on top of IKVM.OpenJDK.Core > and IKVM.RunTime. Am I missing something evident here? > > Please let me know, what else you would need to know to make any > suggestions. > > Using Eclipse on the Java side and as already mentioned Visual Studio > and C# on the .NET side. > > Sincere regards > > Vito Smolej (smo) > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > > > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers |