runtime.exec Questions
3
I'm using Runtime.getRuntime().exec in eclipse to run another java program from the current program.
I've used the following code.
InputStreamReader isr=new InputStreamReader(System.in);
BufferedR...
Pressman asked 31/10, 2011 at 22:9
4
I have a java program that fires off an executable using the Runtime.exec() method. I'm using the variant that takes in a set of command line params as one argument, and some environment variables ...
Mercurio asked 29/4, 2010 at 22:24
5
Solved
I'd like to get the output from a long running shell command as it is available instead of waiting for the command to complete. My code is run in a new thread
Process proc = Runtime.getRuntime().e...
Drugstore asked 13/10, 2011 at 17:23
1
Solved
Just wondering, if there is something better, newer, safer, faster, etc than Runtime.getRuntime().exec().
I want to run another process from my application on linux, and this is the only way i kno...
Algiers asked 15/8, 2011 at 19:5
1
Solved
I have run into an issue where , when using Java Runtime to run another java program, the program freezes because the other program requires stdin . There is a problem with handling the stdin after...
Highbred asked 21/7, 2011 at 17:56
1
I want to invoke a Windows command from Java.
Using the following line works fine:
ProcessBuilder pb = new ProcessBuilder("cmd.exe", "/C",
"find \"searchstr\" C://Workspace//inputFile.txt");
B...
Luci asked 20/5, 2011 at 8:25
2
Solved
I have a java program that runs another (Python) program as a process.
Process p = Runtime.getRuntime().exec("program.py", envp);
If the java program finish processing, the Python process is fi...
Eloquence asked 13/5, 2011 at 7:25
1
Solved
I have a program which is:
import java.io.*;
import java.util.*;
public class ExecBashCommand {
public static void main(String args[]) throws IOException {
if (args.length <= 0) {
Syste...
Consignment asked 4/5, 2011 at 16:49
1
Which one is better? By better I mean which one has better security, etc. (not ease of use).
Corpora asked 4/5, 2011 at 16:41
3
I wish to create a process using java's runtime:
for example. Process proc = Runtime.getRuntime().exec("cmd");
Then, I want to somehow wait for the process until it is in 'ready for input' state, ...
Contiguous asked 28/4, 2011 at 23:7
1
Solved
So we have a java process that runs as a windows service. It needs to execute a command with Runtime.getRuntime().exec(command). The command it executes requires UAC. This is on windows server 2008...
Erewhile asked 12/4, 2011 at 23:42
1
Solved
I've been looking up ways to run external programs using Java's runtime. This works fine, for instance:
String[] cmd = {"mkdir", "test"};
Runtime.getRuntime().exec(cmd);
Creates a new directory ...
Mook asked 18/1, 2011 at 15:44
3
Solved
How can I start a second Java process platform independent? Ideally it should be the same Java version that currently running. Are there any helpful system properties?
Gully asked 12/12, 2010 at 12:36
2
Solved
I use Runtime exec() method to create a subprocess in Java. However, since the subprocess is an interactive program, I need to provide input to it as and when required by it. Also I need to show th...
Warp asked 25/11, 2010 at 1:13
1
Solved
I'm trying to create a frontend app in Java to handle batch SVG conversions using Inkscape's command line feature. I'm taking and updating the code from https://sourceforge.net/projects/conversions...
Valdes asked 22/10, 2010 at 13:14
4
Solved
Can anyone make any suggestions about how best to use EasyMock to expect a call to Runtime.getRuntime().exec(xxx)?
I could move the call into a method in another class that implements an interface...
Figured asked 13/2, 2010 at 14:44
1
I have the following snippet of code:
Process proc = runtime.exec(command);
errorGobbler = new ErrorStreamGobbler(proc.getErrorStream(), logErrors, mdcMap);
outputGobbler = new OutputStreamGobbler...
Langsyne asked 27/7, 2010 at 11:22
2
Solved
Runtime objRuntime = Runtime.getRuntime();
String strBackupString = "mysqldump -u " + userName + " -p" + password + " " + dbName;
Process objProcess = objRuntime.exec(strBackupString);
This is us...
Eggleston asked 9/5, 2010 at 17:2
2
I want to execute some sql scripts using Java's Runtime.exec method. I intend to invoke mysql.exe / mysql.sh and redirect the script file to this process.
From the command prompt I can run the comm...
Skirling asked 1/4, 2010 at 20:10
4
Solved
I Have a bit of a strange problem no java expert i know could solve ..
i need to used imagemagick on my application to make the emails on my website converted to images so no pot can take the emai...
Vennieveno asked 27/1, 2010 at 15:20
5
Solved
I can not read a file only when database name contains like (new database (myid) etc.
I give a following example code:
dumpCommand = "C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump -h"+host...
Pneumococcus asked 27/1, 2010 at 12:18
6
Solved
I'd like to invoke bash using a string as input. Something like:
sh -l -c "./foo"
I'd like to do this from Java. Unfortunately, when I try to invoke the command using getRuntime().exec, I get th...
Fourlegged asked 2/10, 2008 at 11:43
© 2022 - 2024 — McMap. All rights reserved.