i want to execute this shell script:
export.run
cd ./AndroidExport/
ant release
with this java code:
.....
Runtime shell = Runtime.getRuntime();
Process prozess = null;
String cmd = "sh ./export/android/export.run";
try {
prozess = shell.exec(cmd);
} catch (IOException ioe) {
}
BufferedReader in = new BufferedReader(
new InputStreamReader(prozess.getInputStream()) );
String line;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
.....
When i execute the shell script in a console, it compile the android project and i get this output:
Buildfile: /home/myhome/NetBeansProjects/ITGEditor/export/android/AndroidExport /build.xml
-set-mode-check:
-set-release-mode:
[echo] *************************************************
[echo] **** Android Manifest has debuggable=true ****
[echo] **** Doing DEBUG packaging with RELEASE keys ****
[echo] *************************************************
and many more lines, but when i execute it with java, it wan´t compile it and the java console only print the first line:
Buildfile: /home/myhome/NetBeansProjects/ITGEditor/export/android/AndroidExport /build.xml
Where is the problem? Thanks!