command-execution

Is java Runtime.exec(String[]) platform independent?

I had some code that ran commands through Runtime.getRuntime.exec(String), and it worked on Windows. When I moved the code to Linux, it broke, and the only way of fixing it was to switch to the exec(String[]) version. If I leave things this way, will the code work the same on Windows and Linux, or should I use the exec(String) on Windows...

conditional execution (&& and ||) in powershell

Hello! There's already question addressing my issue (http://stackoverflow.com/questions/563600/can-i-get-to-work-in-powershell), but with one difference. I need an OUTPUT from both commands. See, if I just run: (command1 -arg1 -arg2) -and (command2 -arg1) I won't see any output, but stderr messages. And, as expected, just typing: com...

Some commands hang my Ruby web app

I'm playing around with Rails & Sinatra, and I want to execute commands on the server. Those commands are entered from a form. The thing is, if I enter a command which expects input, my whole app hangs. Here's the code I'm using to execute them: @threads << Thread.new do Thread.current["buffer"] = "" puts "starting #{params[:com...

How to execute a jar from pom.xml

I want to create a build info file into the specific location of the project's target folder (especially in target/abc_project/META-INF folder) through maven-2. Following is what I am doing in the pom.xml <build> <finalName>abc_project</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId...