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) {
} else {
// Cancel Button selected do something

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:Id of "Move..." context menu entry in Navigator view
Next Topic:adding a new VM to installed JRE workbench
Goto Forum:

Current Time: Thu Mar 22 14:00:26 GMT 2018

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

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