简体   繁体   English

IntelliJ Idea,如何从控制台中删除 java 文件目录?

[英]IntelliJ Idea, how to remove java file directory from Console?

When you run a file, it opens the console window and all the way on top it has the directory of where the file is.当你运行一个文件时,它会打开控制台窗口,并且一直在顶部它有文件所在的目录。 This is pretty irritating because now, to separate other lines from mixing with the directory, I have to use "\\n" on before any System.out.println() commands can be initiated.这非常令人恼火,因为现在为了将其他行与目录混合,我必须在启动任何 System.out.println() 命令之前使用“\\n”。

"C:\\Program FIles..." I want to get rid of that. “C:\\Program FIles...”我想摆脱它。

There is presently no way to disable this.目前没有办法禁用它。

It does show useful information which shows which jvm is being used and which parameters are used to configure it, so it does "annotate" your program log to some extent.它确实显示了有用的信息,显示正在使用哪个 jvm 以及用于配置它的参数,因此它确实在某种程度上“注释”了您的程序日志。 You'll also get a line stating the exit code when your program terminates.当您的程序终止时,您还会看到一行说明退出代码。

There is an option to be able to write the console log to a file, I'm not sure if it shows the jvm version and exit code or not, perhaps you can try it and see if it is be useful to you.有一个选项可以将控制台日志写入文件,我不确定它是否显示了 jvm 版本和退出代码,也许您可​​以尝试一下,看看它是否对您有用。

也许尝试设置->编辑器->常规->控制台,在“折叠包含:的控制台行”中,添加要折叠的行的子字符串,例如“C:\\Program Files”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM