如何将 jar 输出从 ubuntu 命令提示符重定向到文本文件 [英] How to redirect jar output from ubuntu command prompt to text file

查看:32
本文介绍了如何将 jar 输出从 ubuntu 命令提示符重定向到文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了 jar 文件并使用如下命令运行它:

I created jar file and I run it using command as follows:

$ java -jar niidle.jar arguments...

它显示正确的输出.但我看不到整个输出.我想查看整个输出.那么当我运行以下命令时,如何将整个内容重定向到文本文件:

it is showing correct output. But I cant see the whole output. I want to see the whole output. so how to redirect this whole thing to text file, when I run following command:

$ java -jar niidle.jar arguments...

推荐答案

应该这样做!!

java -jar class.jar 2>> log.txt

java -jar class.jar 2>> log.txt

这篇关于如何将 jar 输出从 ubuntu 命令提示符重定向到文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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