when I am executing webdriver scripts from command prompt I get error "could not find or load main class

Posted by Rahul Belhekar on Stack Overflow See other posts from Stack Overflow or by Rahul Belhekar
Published on 2012-10-30T10:38:22Z Indexed on 2012/10/30 11:02 UTC
Read the original article Hit count: 206

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about java

Related posts about webdriver