批量输出重定向同时使用start命令 [英] Output redirection in batch while using start command

查看:1524
本文介绍了批量输出重定向同时使用start命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启动Java的罐子app.jar> log1.out;

start java -jar app.jar > log1.out ;

启动Java的罐子app.jar> log2.out;

start java -jar app.jar > log2.out ;

启动Java的罐子app.jar> log3.out;

start java -jar app.jar > log3.out ;

它将启动三个并行的实例。但是,输出不重定向到文件中,它显示在控制台上只输出。

it launches the three parallel instance. But output does not get redirected to file, it shows output on console only .

先谢谢了。

推荐答案

使用此重定向

start cmd /c java -jar app.jar ^> log1.out 

不要忘了 ^ 。它被用来作为一个在这里逃生。在没有的 ^ > 将被视为重定向到启动,而不是的Java

Don't forget the ^. It's used as an escape here. In the absence of the ^, the > will be taken as a redirect to the start rather than to java.

这篇关于批量输出重定向同时使用start命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆