Typically that error indicates trying to call a method and it can't figure out which overloaded version you are calling.
I am not familiar with SunToolkit.disableBackgroundErase, but googling around it doesn't appear to be an overloaded method is it? If it isn't, then likely it is a bug in the Java FFI resolver - I can take a look tonight.
Hard to tell what could be going on without adding some debug - here the source code where the error is reported.
brianMon 1 Jun 2009
@Yelagin
OK, my original comment was incorrect - this is a problem with the runtime dispatch of the dynamic invoke operator (not a compiler error). That code is in JavaType.java.
I tried to reproduce this problem using this program:
Yelagin Mon 1 Jun 2009
Toolkit.getDefaultToolkit()->disableBackgroundErase(myCanvas)
results in this: sys::Err: Cannot call
[java]sun.awt::SunToolkit.disableBackgroundErase
: sys::A rgErr: Ambiguous method calldisableBackgroundErase
What's the problem?
brian Mon 1 Jun 2009
Typically that error indicates trying to call a method and it can't figure out which overloaded version you are calling.
I am not familiar with
SunToolkit.disableBackgroundErase
, but googling around it doesn't appear to be an overloaded method is it? If it isn't, then likely it is a bug in the Java FFI resolver - I can take a look tonight.Hard to tell what could be going on without adding some debug - here the source code where the error is reported.
brian Mon 1 Jun 2009
@Yelagin
OK, my original comment was incorrect - this is a problem with the runtime dispatch of the dynamic invoke operator (not a compiler error). That code is in JavaType.java.
I tried to reproduce this problem using this program:
But I cannot duplicate the problem.
What version of Java are you using?
Yelagin Tue 2 Jun 2009
On jre 1.6.0_13-b03 and jre 1.6.0_14-b08 your code throws the same exception.
brian Tue 2 Jun 2009
Promoted to ticket #618 and assigned to brian
OK, I upgraded my JRE and I can see the problem now:
I haven't fully implemented the JLS rules for resolving the best match yet, so that is the problem.
I will try to push a fix to hg Wed morning.
In the meantime here a work around using old-school Java reflection:
brian Tue 2 Jun 2009
Ticket resolved in 1.0.44
Fix pushed to hg