Can't inherit from System.Windows.Forms.Form

View: New views
6 Messages — Rating Filter:   Alert me  

Can't inherit from System.Windows.Forms.Form

by Роман Донченко :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm trying to compile this simple Java class:

~
import cli.System.Windows.Forms.Application;
import cli.System.Windows.Forms.Form;

public class TestForm extends Form
{
     public static void main(String[] args)
     {
         Application.Run(new TestForm());
     }
}
~

I've created stub jars for .NET assemblies:

> ikvmstub mscorlib
> ikvmstub System
> ikvmstub System.Windows.Forms

And when I try to compile the class, this happens:

> javac -classpath mscorlib.jar;System.jar;System.Windows.Forms.jar  
> TestForm.java
TestForm.java:4: get_Container() in cli.System.ComponentModel.Component  
cannot implement get_Container() in  
cli.System.Windows.Forms.Layout.IArrangedElement; attempting to use  
incompatible return type
found   : cli.System.ComponentModel.IContainer
required: cli.System.Windows.Forms.Layout.IArrangedElement
public class TestForm extends Form
        ^
1 error

Well, the meaning of the error is quite transparent:  
System.Windows.Forms.Control, which System.Windows.Forms.Form inherits,  
inherits the Container property from System.ComponentModel.Component, and  
also implements a property with the same name but different type from  
System.Windows.Forms.Layout.IArrangedElement - and in Java, that's not  
possible.

The question is: can I do something about it? I can't find any mention of  
this issue, so maybe it's my fault. The old samples distribution suggests  
that extending Form is possible, albeit it seems to predate .NET Framework  
2.

I'm using Windows, JDK 1.6.0_16, and here's the output of ikvm -version:

IKVM.NET Launcher version 0.40.0.3
Copyright (C) 2002-2009 Jeroen Frijters
http://www.ikvm.net/

CLR version: 2.0.50727.3082 (32 bit)
mscorlib: 2.0.0.0
mscorlib.resources: 2.0.0.0
ikvm: 0.40.0.3
System: 2.0.0.0
IKVM.OpenJDK.Core: 0.40.0.3
IKVM.Runtime: 0.40.0.3
System.Configuration: 2.0.0.0
System.Xml: 2.0.0.0
GNU Classpath version: 0.95
OpenJDK version: OpenJDK 6 b12

Roman.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

Re: Can't inherit from System.Windows.Forms.Form

by Volker Berlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have run you program with the current HEAD branch without any error messages and I see a gray window. Can you test the
0.42rc http://weblog.ikvm.net/? It look like that Jeroen has fix this problem.

Volker


> -----Ursprungliche Nachricht-----
> Von: ????? ???????? [mailto:DXDragon@...]
> Gesendet: Sonntag, 18. Oktober 2009 16:44
> An: ikvm-developers@...
> Betreff: [Ikvm-developers] Can't inherit from
> System.Windows.Forms.Form
>
> Hello,
>
> I'm trying to compile this simple Java class:
>
> ~
> import cli.System.Windows.Forms.Application;
> import cli.System.Windows.Forms.Form;
>
> public class TestForm extends Form
> {
>      public static void main(String[] args)
>      {
>          Application.Run(new TestForm());
>      }
> }
> ~
>
> I've created stub jars for .NET assemblies:
>
> > ikvmstub mscorlib
> > ikvmstub System
> > ikvmstub System.Windows.Forms
>
> And when I try to compile the class, this happens:
>
> > javac -classpath mscorlib.jar;System.jar;System.Windows.Forms.jar  
> > TestForm.java
> TestForm.java:4: get_Container() in
> cli.System.ComponentModel.Component  
> cannot implement get_Container() in  
> cli.System.Windows.Forms.Layout.IArrangedElement; attempting to use  
> incompatible return type
> found   : cli.System.ComponentModel.IContainer
> required: cli.System.Windows.Forms.Layout.IArrangedElement
> public class TestForm extends Form
>         ^
> 1 error
>
> Well, the meaning of the error is quite transparent:  
> System.Windows.Forms.Control, which System.Windows.Forms.Form
> inherits,  
> inherits the Container property from
> System.ComponentModel.Component, and  
> also implements a property with the same name but different
> type from  
> System.Windows.Forms.Layout.IArrangedElement - and in Java,
> that's not  
> possible.
>
> The question is: can I do something about it? I can't find
> any mention of  
> this issue, so maybe it's my fault. The old samples
> distribution suggests  
> that extending Form is possible, albeit it seems to predate
> .NET Framework  
> 2.
>
> I'm using Windows, JDK 1.6.0_16, and here's the output of
> ikvm -version:
>
> IKVM.NET Launcher version 0.40.0.3
> Copyright (C) 2002-2009 Jeroen Frijters
> http://www.ikvm.net/
>
> CLR version: 2.0.50727.3082 (32 bit)
> mscorlib: 2.0.0.0
> mscorlib.resources: 2.0.0.0
> ikvm: 0.40.0.3
> System: 2.0.0.0
> IKVM.OpenJDK.Core: 0.40.0.3
> IKVM.Runtime: 0.40.0.3
> System.Configuration: 2.0.0.0
> System.Xml: 2.0.0.0
> GNU Classpath version: 0.95
> OpenJDK version: OpenJDK 6 b12
>
> Roman.
>
>
> --------------------------------------------------------------
> ----------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year.
> Jumpstart your
> developing skills, take BlackBerry mobile applications to
> market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Ikvm-developers mailing list
> Ikvm-developers@...
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers
>


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

Re: Can't inherit from System.Windows.Forms.Form

by Jeroen Frijters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Roman,

You're not doing anything wrong. This probably got broken at some point, either by a change to .NET or by a change to ikvmstub.

I will add a fix (really a workaround) for this to IKVM 0.44 (not 0.42, which is the next release). In the mean time, if you want to continue, I've created a fixed System.Windows.Forms.jar that is available here:

http://www.frijters.net/System.Windows.Forms.jar

I've created this by fixing my development version to ignore non-public interfaces. I will check in a variation of this fix soon.

BTW, another (more cumbersome) alternative would be to decompile the jar and then fix it. Or even write the stubs by hand. As long as the parts that are used match with what ikvmc sees in the assembly (when you reference the assembly with -r, don't include the stubs in that case) it will substitute the real types.

Regards,
Jeroen

> -----Original Message-----
> From: Роман Донченко [mailto:DXDragon@...]
> Sent: Sunday, October 18, 2009 4:44 PM
> To: ikvm-developers@...
> Subject: [Ikvm-developers] Can't inherit from System.Windows.Forms.Form
>
> Hello,
>
> I'm trying to compile this simple Java class:
>
> ~
> import cli.System.Windows.Forms.Application;
> import cli.System.Windows.Forms.Form;
>
> public class TestForm extends Form
> {
>      public static void main(String[] args)
>      {
>          Application.Run(new TestForm());
>      }
> }
> ~
>
> I've created stub jars for .NET assemblies:
>
> > ikvmstub mscorlib
> > ikvmstub System
> > ikvmstub System.Windows.Forms
>
> And when I try to compile the class, this happens:
>
> > javac -classpath mscorlib.jar;System.jar;System.Windows.Forms.jar
> > TestForm.java
> TestForm.java:4: get_Container() in cli.System.ComponentModel.Component
> cannot implement get_Container() in
> cli.System.Windows.Forms.Layout.IArrangedElement; attempting to use
> incompatible return type
> found   : cli.System.ComponentModel.IContainer
> required: cli.System.Windows.Forms.Layout.IArrangedElement
> public class TestForm extends Form
>         ^
> 1 error
>
> Well, the meaning of the error is quite transparent:
> System.Windows.Forms.Control, which System.Windows.Forms.Form inherits,
> inherits the Container property from System.ComponentModel.Component,
> and also implements a property with the same name but different type
> from System.Windows.Forms.Layout.IArrangedElement - and in Java, that's
> not possible.
>
> The question is: can I do something about it? I can't find any mention
> of this issue, so maybe it's my fault. The old samples distribution
> suggests that extending Form is possible, albeit it seems to predate
> .NET Framework 2.
>
> I'm using Windows, JDK 1.6.0_16, and here's the output of ikvm -
> version:
>
> IKVM.NET Launcher version 0.40.0.3
> Copyright (C) 2002-2009 Jeroen Frijters
> http://www.ikvm.net/
>
> CLR version: 2.0.50727.3082 (32 bit)
> mscorlib: 2.0.0.0
> mscorlib.resources: 2.0.0.0
> ikvm: 0.40.0.3
> System: 2.0.0.0
> IKVM.OpenJDK.Core: 0.40.0.3
> IKVM.Runtime: 0.40.0.3
> System.Configuration: 2.0.0.0
> System.Xml: 2.0.0.0
> GNU Classpath version: 0.95
> OpenJDK version: OpenJDK 6 b12
>
> Roman.
>
>
> -----------------------------------------------------------------------
> -------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA is
> the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and
> stay ahead of the curve. Join us from November 9 - 12, 2009. Register
> now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Ikvm-developers mailing list
> Ikvm-developers@...
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

Re: Can't inherit from System.Windows.Forms.Form

by Jeroen Frijters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Volker,

What Java compiler did you use? With javac from JDK 1.6 the problem does show up, but I suspect that not all Java compilers (or versions of javac) behave the same.

Regards,
Jeroen

> -----Original Message-----
> From: Volker Berlin [mailto:volker.berlin@...]
> Sent: Sunday, October 18, 2009 6:19 PM
> To: ikvm-developers@...
> Subject: Re: [Ikvm-developers] Can't inherit from
> System.Windows.Forms.Form
>
> Hi,
>
> I have run you program with the current HEAD branch without any error
> messages and I see a gray window. Can you test the 0.42rc
> http://weblog.ikvm.net/? It look like that Jeroen has fix this problem.
>
> Volker
>
>
> > -----Ursprungliche Nachricht-----
> > Von: ????? ???????? [mailto:DXDragon@...]
> > Gesendet: Sonntag, 18. Oktober 2009 16:44
> > An: ikvm-developers@...
> > Betreff: [Ikvm-developers] Can't inherit from
> > System.Windows.Forms.Form
> >
> > Hello,
> >
> > I'm trying to compile this simple Java class:
> >
> > ~
> > import cli.System.Windows.Forms.Application;
> > import cli.System.Windows.Forms.Form;
> >
> > public class TestForm extends Form
> > {
> >      public static void main(String[] args)
> >      {
> >          Application.Run(new TestForm());
> >      }
> > }
> > ~
> >
> > I've created stub jars for .NET assemblies:
> >
> > > ikvmstub mscorlib
> > > ikvmstub System
> > > ikvmstub System.Windows.Forms
> >
> > And when I try to compile the class, this happens:
> >
> > > javac -classpath mscorlib.jar;System.jar;System.Windows.Forms.jar
> > > TestForm.java
> > TestForm.java:4: get_Container() in
> > cli.System.ComponentModel.Component
> > cannot implement get_Container() in
> > cli.System.Windows.Forms.Layout.IArrangedElement; attempting to use
> > incompatible return type
> > found   : cli.System.ComponentModel.IContainer
> > required: cli.System.Windows.Forms.Layout.IArrangedElement
> > public class TestForm extends Form
> >         ^
> > 1 error
> >
> > Well, the meaning of the error is quite transparent:
> > System.Windows.Forms.Control, which System.Windows.Forms.Form
> > inherits, inherits the Container property from
> > System.ComponentModel.Component, and also implements a property with
> > the same name but different type from
> > System.Windows.Forms.Layout.IArrangedElement - and in Java, that's
> not
> > possible.
> >
> > The question is: can I do something about it? I can't find any
> mention
> > of this issue, so maybe it's my fault. The old samples distribution
> > suggests that extending Form is possible, albeit it seems to predate
> > .NET Framework 2.
> >
> > I'm using Windows, JDK 1.6.0_16, and here's the output of ikvm
> > -version:
> >
> > IKVM.NET Launcher version 0.40.0.3
> > Copyright (C) 2002-2009 Jeroen Frijters http://www.ikvm.net/
> >
> > CLR version: 2.0.50727.3082 (32 bit)
> > mscorlib: 2.0.0.0
> > mscorlib.resources: 2.0.0.0
> > ikvm: 0.40.0.3
> > System: 2.0.0.0
> > IKVM.OpenJDK.Core: 0.40.0.3
> > IKVM.Runtime: 0.40.0.3
> > System.Configuration: 2.0.0.0
> > System.Xml: 2.0.0.0
> > GNU Classpath version: 0.95
> > OpenJDK version: OpenJDK 6 b12
> >
> > Roman.
> >
> >
> > --------------------------------------------------------------
> > ----------------
> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> > is the only developer event you need to attend this year.
> > Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and
> > stay ahead of the curve. Join us from November 9 - 12, 2009. Register
> > now!
> > http://p.sf.net/sfu/devconference
> > _______________________________________________
> > Ikvm-developers mailing list
> > Ikvm-developers@...
> > https://lists.sourceforge.net/lists/listinfo/ikvm-developers
> >
>
>
> -----------------------------------------------------------------------
> -------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA is
> the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and
> stay ahead of the curve. Join us from November 9 - 12, 2009. Register
> now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Ikvm-developers mailing list
> Ikvm-developers@...
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

Re: Can't inherit from System.Windows.Forms.Form

by Volker Berlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have copy the code sample to eclipse. That I think it is the build in compiler of eclipse. I have not expected such
difference.

Volker

> -----Ursprungliche Nachricht-----
> Von: Jeroen Frijters [mailto:jeroen@...]
> Gesendet: Sonntag, 18. Oktober 2009 18:27
> An: Volker Berlin; ikvm-developers@...
> Betreff: RE: [Ikvm-developers] Can't inherit from
> System.Windows.Forms.Form
>
> Hi Volker,
>
> What Java compiler did you use? With javac from JDK 1.6 the
> problem does show up, but I suspect that not all Java
> compilers (or versions of javac) behave the same.
>
> Regards,
> Jeroen
>
> > -----Original Message-----
> > From: Volker Berlin [mailto:volker.berlin@...]
> > Sent: Sunday, October 18, 2009 6:19 PM
> > To: ikvm-developers@...
> > Subject: Re: [Ikvm-developers] Can't inherit from
> > System.Windows.Forms.Form
> >
> > Hi,
> >
> > I have run you program with the current HEAD branch without
> any error
> > messages and I see a gray window. Can you test the 0.42rc
> > http://weblog.ikvm.net/? It look like that Jeroen has fix
> this problem.
> >
> > Volker
> >
> >
> > > -----Ursprungliche Nachricht-----
> > > Von: ????? ???????? [mailto:DXDragon@...]
> > > Gesendet: Sonntag, 18. Oktober 2009 16:44
> > > An: ikvm-developers@...
> > > Betreff: [Ikvm-developers] Can't inherit from
> > > System.Windows.Forms.Form
> > >
> > > Hello,
> > >
> > > I'm trying to compile this simple Java class:
> > >
> > > ~
> > > import cli.System.Windows.Forms.Application;
> > > import cli.System.Windows.Forms.Form;
> > >
> > > public class TestForm extends Form
> > > {
> > >      public static void main(String[] args)
> > >      {
> > >          Application.Run(new TestForm());
> > >      }
> > > }
> > > ~
> > >
> > > I've created stub jars for .NET assemblies:
> > >
> > > > ikvmstub mscorlib
> > > > ikvmstub System
> > > > ikvmstub System.Windows.Forms
> > >
> > > And when I try to compile the class, this happens:
> > >
> > > > javac -classpath
> mscorlib.jar;System.jar;System.Windows.Forms.jar
> > > > TestForm.java
> > > TestForm.java:4: get_Container() in
> > > cli.System.ComponentModel.Component
> > > cannot implement get_Container() in
> > > cli.System.Windows.Forms.Layout.IArrangedElement;
> attempting to use
> > > incompatible return type
> > > found   : cli.System.ComponentModel.IContainer
> > > required: cli.System.Windows.Forms.Layout.IArrangedElement
> > > public class TestForm extends Form
> > >         ^
> > > 1 error
> > >
> > > Well, the meaning of the error is quite transparent:
> > > System.Windows.Forms.Control, which System.Windows.Forms.Form
> > > inherits, inherits the Container property from
> > > System.ComponentModel.Component, and also implements a
> property with
> > > the same name but different type from
> > > System.Windows.Forms.Layout.IArrangedElement - and in Java, that's
> > not
> > > possible.
> > >
> > > The question is: can I do something about it? I can't find any
> > mention
> > > of this issue, so maybe it's my fault. The old samples
> distribution
> > > suggests that extending Form is possible, albeit it seems
> to predate
> > > .NET Framework 2.
> > >
> > > I'm using Windows, JDK 1.6.0_16, and here's the output of ikvm
> > > -version:
> > >
> > > IKVM.NET Launcher version 0.40.0.3
> > > Copyright (C) 2002-2009 Jeroen Frijters http://www.ikvm.net/
> > >
> > > CLR version: 2.0.50727.3082 (32 bit)
> > > mscorlib: 2.0.0.0
> > > mscorlib.resources: 2.0.0.0
> > > ikvm: 0.40.0.3
> > > System: 2.0.0.0
> > > IKVM.OpenJDK.Core: 0.40.0.3
> > > IKVM.Runtime: 0.40.0.3
> > > System.Configuration: 2.0.0.0
> > > System.Xml: 2.0.0.0
> > > GNU Classpath version: 0.95
> > > OpenJDK version: OpenJDK 6 b12
> > >
> > > Roman.
> > >
> > >
> > > --------------------------------------------------------------
> > > ----------------
> > > Come build with us! The BlackBerry(R) Developer
> Conference in SF, CA
> > > is the only developer event you need to attend this year.
> > > Jumpstart your
> > > developing skills, take BlackBerry mobile applications to
> market and
> > > stay ahead of the curve. Join us from November 9 - 12,
> 2009. Register
> > > now!
> > > http://p.sf.net/sfu/devconference
> > > _______________________________________________
> > > Ikvm-developers mailing list
> > > Ikvm-developers@...
> > > https://lists.sourceforge.net/lists/listinfo/ikvm-developers
> > >
> >
> >
> >
> --------------------------------------------------------------
> ---------
> > -------
> > Come build with us! The BlackBerry(R) Developer Conference
> in SF, CA is
> > the only developer event you need to attend this year.
> Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and
> > stay ahead of the curve. Join us from November 9 - 12,
> 2009. Register
> > now!
> > http://p.sf.net/sfu/devconference
> > _______________________________________________
> > Ikvm-developers mailing list
> > Ikvm-developers@...
> > https://lists.sourceforge.net/lists/listinfo/ikvm-developers
>


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

Re: Can't inherit from System.Windows.Forms.Form

by Jeroen Frijters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just tried it with the Eclipse Java Compiler (from the command line) and it does indeed compile with the "broken" jar. So that is another workaround.

Regards,
Jeroen

> -----Original Message-----
> From: Volker Berlin [mailto:volker.berlin@...]
> Sent: Sunday, October 18, 2009 6:28 PM
> To: Jeroen Frijters; ikvm-developers@...
> Subject: AW: [Ikvm-developers] Can't inherit from
> System.Windows.Forms.Form
>
> I have copy the code sample to eclipse. That I think it is the build in
> compiler of eclipse. I have not expected such difference.
>
> Volker
>
> > -----Ursprungliche Nachricht-----
> > Von: Jeroen Frijters [mailto:jeroen@...]
> > Gesendet: Sonntag, 18. Oktober 2009 18:27
> > An: Volker Berlin; ikvm-developers@...
> > Betreff: RE: [Ikvm-developers] Can't inherit from
> > System.Windows.Forms.Form
> >
> > Hi Volker,
> >
> > What Java compiler did you use? With javac from JDK 1.6 the problem
> > does show up, but I suspect that not all Java compilers (or versions
> > of javac) behave the same.
> >
> > Regards,
> > Jeroen
> >
> > > -----Original Message-----
> > > From: Volker Berlin [mailto:volker.berlin@...]
> > > Sent: Sunday, October 18, 2009 6:19 PM
> > > To: ikvm-developers@...
> > > Subject: Re: [Ikvm-developers] Can't inherit from
> > > System.Windows.Forms.Form
> > >
> > > Hi,
> > >
> > > I have run you program with the current HEAD branch without
> > any error
> > > messages and I see a gray window. Can you test the 0.42rc
> > > http://weblog.ikvm.net/? It look like that Jeroen has fix
> > this problem.
> > >
> > > Volker
> > >
> > >
> > > > -----Ursprungliche Nachricht-----
> > > > Von: ????? ???????? [mailto:DXDragon@...]
> > > > Gesendet: Sonntag, 18. Oktober 2009 16:44
> > > > An: ikvm-developers@...
> > > > Betreff: [Ikvm-developers] Can't inherit from
> > > > System.Windows.Forms.Form
> > > >
> > > > Hello,
> > > >
> > > > I'm trying to compile this simple Java class:
> > > >
> > > > ~
> > > > import cli.System.Windows.Forms.Application;
> > > > import cli.System.Windows.Forms.Form;
> > > >
> > > > public class TestForm extends Form {
> > > >      public static void main(String[] args)
> > > >      {
> > > >          Application.Run(new TestForm());
> > > >      }
> > > > }
> > > > ~
> > > >
> > > > I've created stub jars for .NET assemblies:
> > > >
> > > > > ikvmstub mscorlib
> > > > > ikvmstub System
> > > > > ikvmstub System.Windows.Forms
> > > >
> > > > And when I try to compile the class, this happens:
> > > >
> > > > > javac -classpath
> > mscorlib.jar;System.jar;System.Windows.Forms.jar
> > > > > TestForm.java
> > > > TestForm.java:4: get_Container() in
> > > > cli.System.ComponentModel.Component
> > > > cannot implement get_Container() in
> > > > cli.System.Windows.Forms.Layout.IArrangedElement;
> > attempting to use
> > > > incompatible return type
> > > > found   : cli.System.ComponentModel.IContainer
> > > > required: cli.System.Windows.Forms.Layout.IArrangedElement
> > > > public class TestForm extends Form
> > > >         ^
> > > > 1 error
> > > >
> > > > Well, the meaning of the error is quite transparent:
> > > > System.Windows.Forms.Control, which System.Windows.Forms.Form
> > > > inherits, inherits the Container property from
> > > > System.ComponentModel.Component, and also implements a
> > property with
> > > > the same name but different type from
> > > > System.Windows.Forms.Layout.IArrangedElement - and in Java,
> that's
> > > not
> > > > possible.
> > > >
> > > > The question is: can I do something about it? I can't find any
> > > mention
> > > > of this issue, so maybe it's my fault. The old samples
> > distribution
> > > > suggests that extending Form is possible, albeit it seems
> > to predate
> > > > .NET Framework 2.
> > > >
> > > > I'm using Windows, JDK 1.6.0_16, and here's the output of ikvm
> > > > -version:
> > > >
> > > > IKVM.NET Launcher version 0.40.0.3 Copyright (C) 2002-2009 Jeroen
> > > > Frijters http://www.ikvm.net/
> > > >
> > > > CLR version: 2.0.50727.3082 (32 bit)
> > > > mscorlib: 2.0.0.0
> > > > mscorlib.resources: 2.0.0.0
> > > > ikvm: 0.40.0.3
> > > > System: 2.0.0.0
> > > > IKVM.OpenJDK.Core: 0.40.0.3
> > > > IKVM.Runtime: 0.40.0.3
> > > > System.Configuration: 2.0.0.0
> > > > System.Xml: 2.0.0.0
> > > > GNU Classpath version: 0.95
> > > > OpenJDK version: OpenJDK 6 b12
> > > >
> > > > Roman.
> > > >
> > > >
> > > > --------------------------------------------------------------
> > > > ----------------
> > > > Come build with us! The BlackBerry(R) Developer
> > Conference in SF, CA
> > > > is the only developer event you need to attend this year.
> > > > Jumpstart your
> > > > developing skills, take BlackBerry mobile applications to
> > market and
> > > > stay ahead of the curve. Join us from November 9 - 12,
> > 2009. Register
> > > > now!
> > > > http://p.sf.net/sfu/devconference
> > > > _______________________________________________
> > > > Ikvm-developers mailing list
> > > > Ikvm-developers@...
> > > > https://lists.sourceforge.net/lists/listinfo/ikvm-developers
> > > >
> > >
> > >
> > >
> > --------------------------------------------------------------
> > ---------
> > > -------
> > > Come build with us! The BlackBerry(R) Developer Conference
> > in SF, CA is
> > > the only developer event you need to attend this year.
> > Jumpstart your
> > > developing skills, take BlackBerry mobile applications to market
> and
> > > stay ahead of the curve. Join us from November 9 - 12,
> > 2009. Register
> > > now!
> > > http://p.sf.net/sfu/devconference
> > > _______________________________________________
> > > Ikvm-developers mailing list
> > > Ikvm-developers@...
> > > https://lists.sourceforge.net/lists/listinfo/ikvm-developers
> >


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers