I am wondering about to create correct Bat file ,
I am using Maven + Selenium(TestNG)
I have tried many different ways to Resolve exception, But its one of the most common exception: Could not find or load main class / java.lang.ClassNotFoundException
In my Maven project there is no bin or lib folder, And I am wondering for it. Whether to call library from .m2(Maven) installation.
To call class file, In my maven project .class file located something like : E:estBatchDemoargetclassesmytest
Here is sample of What I have tried so far,
set projectLocation=E:estBatchDemo
cd %projectLocation%
set classpath=E:estBatchDemoargetclassesmytest;
java -cp %classpath% C:UsersDesktop-pc.m2
epositoryorgestngestng6.14.3estng-6.14.3.jar; C:UsersDesktop-pc.m2
epositoryorgseleniumhqseleniumselenium-java3.12.0selenium-java-3.12.0.jar; org.testng.TestNG %projectLocation%estng.xml
pause
Anyone can please assist, Which library need to call or How can I achieve correct .class path.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…