This is a sample of Selenium.
ex01.java
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
 
public class ex01 {
 
    public static void main(String[] args) {
        WebDriver driver = new FirefoxDriver();
        driver.get("https://ekzemplaro.org/storytelling/");
	try {
		System.out.println("Stop for 5 seconds");
		Thread.sleep(5000);
		System.out.println("The pause has been released.");
	} catch(InterruptedException e){
		e.printStackTrace();
		}
        driver.quit();
    }
}
Makefile
ex01.class: ex01.java
	javac ex01.java -cp ./client-combined-3.14.0.jar 
clean:
	rm -f ex01.class
compile
$ make
javac ex01.java -cp ./client-combined-3.14.0.jar
Execution method
export CLASSPATH=.:./client-combined-3.14.0.jar:./guava-26.0-jre.jar:./okhttp-3.11.0.jar:./okio-2.0.0.jar:./kotlin-stdlib-1.2.60.jar:./commons-exec-1.3.jar
#
java ex01
You will need the following jars at run time:
client-combined-3.14.0.jar guava-26.0-jre.jar okhttp-3.11.0.jar okio-2.0.0.jar kotlin-stdlib-1.2.60.jar commons-exec-1.3.jar
This is the Java environment I used.
$ javac --version
javac 10.0.2
$ java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13)
OpenJDK 64-Bit Server VM (build 10.0.2+13, mixed mode)
        Recommended Posts