I can't add a webview to a tab content in JavaFX


I'm trying to add a web view to tab content in JavaFX. However, when I load a website the program crashes and closes. and a massage like this tell me about the fatal error:

# A fatal error has been detected by the Java Runtime Environment:
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffebbac0a42, pid=5332, tid=25544
# JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.10+8) (build 11.0.10+8-LTS-162)
# Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (11.0.10+8-LTS-162, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# V  [jvm.dll+0x3b0a42]
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows

FXML Code:

<Tab fx:id="dic_tab" text="Dictionary">
    <AnchorPane prefHeight="200.0" prefWidth="200.0">
        <WebView fx:id="web" prefHeight="491.2" prefWidth="1100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />

A method to load the webEngine:

WebEngine webEngine = web.getEngine();

I've searched a lot for this problem but didn't figure out the root problem.

asked on Stack Overflow Feb 28, 2021 by 7GOGO9 • edited Feb 28, 2021 by Mark Rotteveel

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0