Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
7 years, 2 months ago
This question is
. It is not currently accepting answers.
software development unrelated to testing are off-topic here, but can be asked on Stack Overflow.
i have one selenium project, i need to deploy as jar file how to do that?
i used following tools/api's
Selenium Web driver+java
i don't have Main Method.
Runnable jar able to run on any system which has jdk.
Why I need runnable jar? i need it for deployment to client who has only jdk.
Mar 16, 2016 at 10:10
sameer joshi sameer joshi
524 2 2 gold badges 10 10 silver badges 31 31 bronze badges
As per your question I understood that you are not using maven.So you are running the scripts based on your testng.xml file.So you can use this code in to separate class with main method. So that you are able make RunnableJar.
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testng = new TestNG();
List<String> suites = Lists.newArrayList();
suites.add("c:/tests/testng1.xml");//path to xml..
I hope this solution works for you.
Mar 21, 2016 at 5:35
1,520 14 14 gold badges 36 36 silver badges 56 56 bronze badges
If you are using Eclipse IDE, it provides an option to Export as JAR/Runnable JAR. Please follow below steps:
From the menu bar's File menu, select Export.
Expand the Java node and select Runnable JAR file. Click Next.
Select a 'Java Application' launch configuration to use to create a
In the Export destination field, either type or click Browse to
select a location for the JAR file.
Select an appropriate library handling strategy.
Alternatively you can even export as a JAR and use Launch4J to run as Win application.
Mar 20, 2016 at 22:30
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only