JCEF: Cannot find startup() method in JBR IDE Follow
I'm trying to add a WebView (JCEF) as part of a plugin project I'm making. I'm having quite a few issues with it, but I will probably solve most of them. This one I've been working on for hours and still haven't found a fix, so I'm hoping someone here will have some idea.
I have added this to my gradle .kts build file (I think this is the latest JBR IDE version):
runIde {
setJbrVersion("jbr_jcef-11_0_9_1b1244.2")
}
The IDE launches fine, but when I click the button that should open the WebView, I get the following error:
ERROR - .wm.impl.ToolWindowManagerImpl - Cannot init toolwindow com.example.project.toolWindows.JavaLearnHomeToolWindow@3f9c460e java.lang.NoSuchMethodError: 'boolean org.cef.CefApp.startup()'
(The tool window is completely empty)
When I manually install the plugin via. the settings on my main IDE (2020.3.1), the browser opens fine. So, I'm presuming that the JBR version does not have the correct version of JCEF. I cannot find how to fix this issue. Here is the code for my window, if needed (please note that I have tried with and without my custom scheme handler (which doesn't work either)):
class JavaLearnHomeToolWindowPanel() : SimpleToolWindowPanel(true, false) {
val browser: JBCefBrowser = JBCefBrowser()
val browserComponent = browser.component
init {
registerAppSchemeHandler()
browser.loadURL("http://javalearn/index.html")
browser.openDevtools()
}
private fun registerAppSchemeHandler() {
CefApp.getInstance().registerSchemeHandlerFactory("http", "javalearn", CustomSchemeHandlerFactory())
}
}
Thanks in advance!
Please sign in to leave a comment.
Please share your full build.gradle. Why do you set jbrVersion explicitly?
Here is my full `build.gradle.kts`:
I am setting it explicitly because the inbuilt version was not working. Both the version that is implicitly run without an explicit version and this explicit version produce the same effect.
Thanks in advance!
Please specify what is
- platformVersion
- platformType
and please copy/paste complete "About" dialog text with info about bundled JBR from the target platform when you run sandbox instance without setting setJbrVersion attribute explicitly.
I'm not sure what `platformVersion` and `platformType` are, but I'm running IntelliJ IDEA Ultimate 2020.3.1 (build #IU-203.6682.168). Here is the "About" dialog text from the bundled version:
Important Note: With this bundled version, I get another error:
Please see gradle.properties files for the values of platformVersion and platformType. Please note the exact requirements of enabling/bundling JCEF here https://jetbrains.org/intellij/sdk/docs/reference_guide/jcef.html depending on IDE platform version and chosen JBR.