MachinePublishers / jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java
Other
809 stars 143 forks source link

incompatible with java 11+ #369

Open damnms opened 3 years ago

damnms commented 3 years ago

Task :SslWebClientTest.main() SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [2020-09-08T10:03:54.954][Instance 1][Port 42063] Warning: Single GUI Threadiong is enabled, FPS should be slower [2020-09-08T10:03:54.972][Instance 1][Port 42063] java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/glass/ui/Robot [2020-09-08T10:03:54.972][Instance 1][Port 42063] at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:290) [2020-09-08T10:03:54.972][Instance 1][Port 42063] at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:269) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at java.base/java.lang.Thread.run(Thread.java:832) [2020-09-08T10:03:54.973][Instance 1][Port 42063] Caused by: java.lang.NoClassDefFoundError: com/sun/glass/ui/Robot [2020-09-08T10:03:54.973][Instance 1][Port 42063] at com.machinepublishers.glass.ui.monocle.MonoclePlatformFactory.createApplication(MonoclePlatformFactory.java:44) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at com.sun.glass.ui.Application.run(Application.java:144) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:280) [2020-09-08T10:03:54.973][Instance 1][Port 42063] ... 6 more [2020-09-08T10:03:54.973][Instance 1][Port 42063] Caused by: java.lang.ClassNotFoundException: com.sun.glass.ui.Robot [2020-09-08T10:03:54.973][Instance 1][Port 42063] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) [2020-09-08T10:03:54.973][Instance 1][Port 42063] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) [2020-09-08T10:03:54.973][Instance 1][Port 42063] ... 9 more [2020-09-08T10:03:54.973][Instance 1][Port 42063]

running fedora 32 with java 14 using this code:

package chatclient;

import com.machinepublishers.jbrowserdriver.JBrowserDriver;

public class SslWebClientTest {

    public static void main(String[] args) {

        try {
            JBrowserDriver driver = new JBrowserDriver();
            driver.get("https://www.google.com");
            System.out.println(driver.getPageSource());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}