Eclipse控制台样式 [英] Eclipse console styling

查看:165
本文介绍了Eclipse控制台样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种从Eclipse控制台中打印斜体字的方法。所以有一些变化:

I am looking for a way to print italics out of the Eclipse console. So that some variation of:

System.out.println((Some code)"Hello World");

输出:

你好世界

这是否可能?

感谢您的帮助!

推荐答案

有几个选项可供您使用,但首先,我将说明这是 not 一个默认的Java能力。它完全取决于您正在使用的操作系统和输出控制台(Eclipse,Terminal,Command等)。

There are a few options available to you with this, but first off, I'll make it clear that this is not a default Java ability. It depends entirely on the Operating System and the output console you are using (Eclipse, Terminal, Command, etc).

您可以使用 JCurses Library 在默认控制台窗口中为您提供其他功能。你可以找到一个教程这里可能会帮助你。

You can use the JCurses Library to give you additional functions over the default console window. You can find a tutorial here that might help you.

我发现了一个链接<使用ANSI的href =http://www.javaprogrammingforums.com/java-theory-questions/18443-how-make-console-output-bold.html#post78703 =nofollow>这里转义序列来修改文本,并自行运行代码,以便仔细检查它是否正常工作。它确实改变了字体,并且有一些转义序列列出了这可能会帮助你。

I found a link here that uses ANSI Escape Sequences to modify the text, and ran the code myself to double-check it worked fine. It certainly changed the font, and there are some escape sequences listed here that might help you.

我相信斜体应该是 System.out.println(\030 [3mHello World! \030 [0m);

这篇关于Eclipse控制台样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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