gpt4 book ai didi

java - JxBrowser 7.7 SWT - StartDownloadCallback 错误

转载 作者:行者123 更新时间:2023-12-01 16:19:00 24 4
gpt4 key购买 nike

我到处都找到了这个解决方案,但不幸的是我遇到了错误。

browser.set(StartDownloadCallback.class, (params, tell) -> {
System.out.println("Download");
params.download().on(DownloadFinished.class, event ->
System.out.println("File downloaded!"));
tell.download(createTempDir().toAbsolutePath());
});
error: method set in interface Advisable<P> cannot be applied to given types;
browser.set(StartDownloadCallback.class, (params, tell) -> tell.close());
^
required: Class<C>,C
found: Class<StartDownloadCallback>,(params,te[...]ose()
reason: inference variable C has incompatible bounds
equality constraints: StartDownloadCallback
lower bounds: BrowserCallback
where C,P are type-variables:
C extends BrowserCallback declared in method <C>set(Class<C>,C)
P extends Callback declared in interface Advisable

最佳答案

问题出在 JxBrowser 的版本上。升级到7.8后就可以使用了。

关于java - JxBrowser 7.7 SWT - StartDownloadCallback 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62320179/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com