Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Windows Command is not executed correctly(Windows Command is not executed correctly)
Windows Command is not executed correctly [message #1767730] Mon, 10 July 2017 12:07
Shoumo Das is currently offline Shoumo DasFriend
Messages: 2
Registered: June 2017
Junior Member
I wrote below code
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);


boolean result = MessageDialog.openQuestion(window.getShell(), "Spring Bean Integration Test", "Do you want to continute?");

String accurev_home = System.getenv("ACCUREV_HOME");

if (result){
// OK Button selected do something
try {

Runtime.getRuntime().exec("cmd /c start cmd.exe /K \"cd "+accurev_home+"\\SRN_SF && gradlew : testSpring\"");

MessageDialog.openConfirm(window.getShell(), "Test", "cmd /c start cmd.exe /K \"cd "+accurev_home+"\\SRN_SF && gradlew : testSpring\"");
} catch (IOException ex) {
ex.printStackTrace();
}
} else {
// Cancel Button selected do something
System.out.println(result);
}


return null;
}

It is working fine when run as eclipse application. But it is not working when I export the project as Deployable Plug-ins and fragments .Command prompt is opening with with default eclipse root path. Please help me out.

[Updated on: Mon, 10 July 2017 12:08]

Report message to a moderator

Previous Topic:eclipse mars: network config - proxy settings
Next Topic:Problems invoking selectReveal() on ProjectExplorer view
Goto Forum:
  


Current Time: Fri Nov 16 13:58:58 GMT 2018

Powered by FUDForum. Page generated in 0.01210 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top