I'm using OpenJDK14, but compiling at Java 8 version (as it was specified that compilations above java 8 does not work correctly with jcef).
It's probably worthwhile to note that the jframe does in fact "show up", but once it closes the program does not stop running.
I've been using this guide as an example to get going:
https://medium.com/@daniel.bischoff/int ... f67a677db6
Any idea what could be causing this error, and how can I resolve it ?
Also, are there any official docs to get started in JCEF?
I got an illegal reflective access operation warning when running this code:
- Code: Select all
CefApp c = CefApp.getInstance();
CefClient cli = c.createClient();
CefBrowser br = cli.createBrowser("https://www.google.gr", OS.isWindows(), false);
JFrame frame = new JFrame();
frame.getContentPane().add(br.getUIComponent());
frame.setVisible(true);
frame.addWindowListener(new WindowAdapter() {
@Override public void windowClosing(WindowEvent e) {
frame.dispose();
c.dispose();
// Alternative: CefApp.getInstance().dispose();
}
});
- Code: Select all
"C:\Program Files\AdoptOpenJDK\jdk-14.0.2.12-hotspot\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1\lib\idea_rt.jar=58819:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\...\Desktop\ProgrammingPractice\logging_test\out\production\logging_test;C:\Users\...\Desktop\ProgrammingPractice\logging_test\lib\jcef.jar;C:\Users\...\Desktop\ProgrammingPractice\logging_test\lib\jogl-all.jar;C:\Users\...\Desktop\ProgrammingPractice\logging_test\lib\gluegen-rt.jar;C:\Users\...\Desktop\ProgrammingPractice\logging_test\lib\jcef-tests.jar;C:\Users\...\Desktop\ProgrammingPractice\logging_test\lib\jogl-all-natives-windows-amd64.jar;C:\Users\...\Desktop\ProgrammingPractice\logging_test\lib\gluegen-rt-natives-windows-amd64.jar com.gerelef.Main
initialize on Thread[AWT-EventQueue-0,6,main] with library path C:\Users\...\Desktop\java-cef-build-bin\bin\lib\win64
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/C:/Users/.../Desktop/ProgrammingPractice/logging_test/lib/gluegen-rt.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" [0818/183723.147:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://gstatic.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.", source: https://www.google.gr/ (0)
My development platform is windows 10, and I'm using this (updated, recently precompiled) distribution of JCEF: https://github.com/jcefbuild/jcefbuild/releases