Abhinav
Abhinav

Reputation: 31

Error in java package

@Test

private void AutoItTest() throws IOException {
   java.lang.Runtime().getRuntime().exec("C:\\Selenium\\framework\\AutoITpopupHandler.exe");
}     

Error prompted at java.lang Please provide an appropriate solution.

Upvotes: 1

Views: 54

Answers (1)

FatalError
FatalError

Reputation: 54551

Runtime is a class, you don't "call" it. It should be like:

Runtime.getRuntime().exec("C:\\Selenium\\framework\\AutoITpopupHandler.exe");

Qualifying with java.lang is also not needed, but won't hurt anything.

Upvotes: 5

Related Questions