Hi there!

I'm trying to run an external c++ executable from Java, but i dont know why is not working...

I tried this before on my Java code just for test purposes:

Java Code:
Process p=Runtime.getRuntime().exec("/usr/bin/leafpad");
to execute Leafpad (Raspbian's Text Editor) from my java program and it worked fine...


now, im trying to execute an c++ executable from java, but this dont launch the c++ executable...

Java Code:
Process p=Runtime.getRuntime().exec("/home/pi/PruebaGuardarTxt1");
where PruebaGuardarTxt1 is the name of the c++ executable...


I compiled the c++ code using g++...

When i type on terminal:

cd /home/pi/
sudo ./PruebaGuardarTxt1

It lauchs the c++ executable... but i dont know why it dont get launched from the java code...

Any hints?

Regards!