when I am executing webdriver scripts from command prompt I get error "could not find or load main class
- by Rahul Belhekar
I want to run below java file from command prompt. whenever I am running it from command line it gives error "Error:Could not find or load main class".This is regular java code.It runs well in eclipse but gives this error in command prompt.I have set classpath till my project bin also set "path" till bin folder of jdk, this file is getting compiled but not running from command prompt.please help me to resolve my issue.Waiting for your reply thank you
public class RILookBookGetTheLook extends Libraryfile {
public static void main(String[] args)
{
//Delcaring objects
//String className = this.getClass().getName();
WebDriver driver;
String baseUrl;
final Log LOG = LogFactory.getLog(BrowserLocator.class);
CsvWriter out;
try {
setUp();
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
Display_ProductPage();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
tearDown();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
I have written methods here which I called from main method
Please guys help me to solve this problem