hi everyone!

I have 2 applications, one coded in C++ and the other coded in java, i want to launch the one coded in c++ from the other one, honnestly i dont know how to do it at all
i use eclipse and VS2010

any ideas about that???

thank YOU very much for any help

5 Years
Discussion Span
Last Post by stultuske

thank you for your answer, i tryed to do it by this code but it doesn't work : this is my code

Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec(new String[]{"Microsoft Visual C++ 2010 Express.exe", "readxmlresou.exe"}, null, new File("C:\\Users\\abdelhalim\\Desktop\\"));

the compiler get me this error :

Exception in thread "main" java.io.IOException: Cannot run program "MicrosoftVisualC++2010Express.exe" (in directory "C:\Users\abdelhalim\Desktop"): CreateProcess error=2,The specified file is not found

and im sur that i have "readxmlresou.exe" in that directory??????


also: exception handling is great, but exception avoiding can help as well.
write a test that checks whether or not that file exists on your system, before trying to run it.

Votes + Comments

hi everyone !

Thank YOU stultuske for your help but whene i use this code :

Process process = new ProcessBuilder("C:\\Users\\abdelhalim\\Desktop\\readxmlresou.exe").start();

i dosen't chow me any errors but also dosen't start the program!!!!!
do i miss any thing at all

Thank you again for your help

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.