Skip to main content
added 2 characters in body
Source Link
Alexey R.
  • 11.6k
  • 5
  • 20
  • 39

I am trying to run a java file from selenium using cmd. Just adding libraries means that the java command (in command lines) does not work (javac works, the file is compiled). Does anyone know any hint?

package folder;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.ui.Select;
public class fileJava{
  public static void main(String[] args){
    System.out.print("Hello World");
  }
}[![enter image description here][1]][1]

enter image description here

I am trying to run a java file from selenium using cmd. Just adding libraries means that the java command (in command lines) does not work (javac works, the file is compiled). Does anyone know any hint?

package folder;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.ui.Select;
public class fileJava{
  public static void main(String[] args){
    System.out.print("Hello World");
  }
}[![enter image description here][1]][1]

I am trying to run a java file from selenium using cmd. Just adding libraries means that the java command (in command lines) does not work (javac works, the file is compiled). Does anyone know any hint?

package folder;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.ui.Select;
public class fileJava{
  public static void main(String[] args){
    System.out.print("Hello World");
  }
}

enter image description here

Source Link

Running Selenium via command line java.lang.class.notFoundexception

I am trying to run a java file from selenium using cmd. Just adding libraries means that the java command (in command lines) does not work (javac works, the file is compiled). Does anyone know any hint?

package folder;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.ui.Select;
public class fileJava{
  public static void main(String[] args){
    System.out.print("Hello World");
  }
}[![enter image description here][1]][1]