Re: [Ikvm-developers] Problems with building an AWT-JAR.
Brought to you by:
jfrijters
|
From: Jeroen F. <je...@su...> - 2007-09-11 16:29:17
|
Bj=F6rn Schmitz wrote: > I've built the last release of IKVM.NET with NAnt. The build succeeded > and I got no errors. But when I build a JAR-file with the final > ikvm.exe, I'll get this message: > > C:\workspace\IKVM\ikvm-0.36.0.0\bin>ikvm.exe -jar test_button.jar > Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: > ikvm.awt.NetToolkit, IKVM.AWT.WinForms, Version=3D0.36.0.0, > Culture=3Dneutral, PublicKeyToken=3D13235d27fcbfff58 The strong name of the IKVM.AWT.WinForms assembly is baked into the code, s= o when you do your own build the name doesn't match anymore. You can modify= ikvm\openjdk\Configuration.java to use the non-strong named assembly name: String default_awt_peer_toolkit =3D "ikvm.awt.NetToolkit, IKVM.AWT.WinF= orms"; Alternatively, you can set the awt.toolkit system property: ikvm "-Dawt.toolkit=3Dikvm.awt.NetToolkit, IKVM.AWT.WinForms" -jar test_but= ton.jar Regards, Jeroen |