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:\testBatchDemo\target\classes\mytest
Here is sample of What I have tried so far,
set projectLocation=E:\testBatchDemo
cd %projectLocation%
set classpath=E:\testBatchDemo\target\classes\mytest;
java -cp %classpath% C:\Users\Desktop-pc\.m2\repository\org\testng\testng\6.14.3\testng-6.14.3.jar; C:\Users\Desktop-pc\.m2\repository\org\seleniumhq\selenium\selenium-java\3.12.0\selenium-java-3.12.0.jar; org.testng.TestNG %projectLocation%\testng.xml
pause
Anyone can please assist, Which library need to call or How can I achieve correct .class path.