Hi,
Through command line, I'm trying to compile a java program that simply opens a webpage. This program runs successfully under eclipse.
package Package1;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class TestTest
{
public static void main(String args[])
{
String baseUrl = "https://google.com";
String driverPath = "C:\\Eclipse\\Drivers\\Chromedriver.exe";
WebDriver driver;
System.setProperty("webdriver.chrome.driver", driverPath);
driver = new ChromeDriver();
driver.get(baseUrl);
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
}
I'm setting the path on command line and then running javac command.
C:\Eclipse\WorkSpace\Test1>set classpath=C:\Eclipse\lib\*;C:\Eclipse\Drivers\*;C:\Program Files\Java\jdk-14\*
C:\Eclipse\WorkSpace\Test1>javac -d bin C:\Eclipse\WorkSpace\Test1\src\Package1\TestTest.java
However when I run the program, I get the following error. I can't find anything online that would explain what these errors are.
Thanks in advance!
C:\Eclipse\lib\client-combined-3.141.59-sources.jar(/org/openqa/selenium/net/UrlChecker.java):62: error: cannot find symbol
this(SimpleTimeLimiter.create(THREAD_POOL));
^
symbol: method create(ExecutorService)
location: class SimpleTimeLimiter
C:\Eclipse\lib\client-combined-3.141.59-sources.jar(/org/openqa/selenium/net/UrlChecker.java):75: error: method callWithTimeout in interface TimeLimiter cannot be applied to given types;
timeLimiter.callWithTimeout((Callable<Void>) () -> {
^
required: Callable<T>,long,TimeUnit,boolean
found: Callable<Void>,long,TimeUnit
reason: cannot infer type-variable(s) T
(actual and formal argument lists differ in length)
where T is a type-variable:
T extends Object declared in method <T>callWithTimeout(Callable<T>,long,TimeUnit,boolean)
C:\Eclipse\lib\client-combined-3.141.59-sources.jar(/org/openqa/selenium/net/UrlChecker.java):115: error: method callWithTimeout in interface TimeLimiter cannot be applied to given types;
timeLimiter.callWithTimeout((Callable<Void>) () -> {
^
required: Callable<T>,long,TimeUnit,boolean
found: Callable<Void>,long,TimeUnit
reason: cannot infer type-variable(s) T
(actual and formal argument lists differ in length)
where T is a type-variable:
T extends Object declared in method <T>callWithTimeout(Callable<T>,long,TimeUnit,boolean)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors