首先建立自己的console控制台网上有很多这种例子,javaEye上的一位朋友写的很详细这里贴出来:
?
http://lengbingteng-163-com.iteye.com/blog/1116984
?
还有一篇也不错,很实际:
?
Eclipse插件开发之建立Console视图并在其中显示自定义信息
?
这篇文章连接子:http://www.blogjava.net/hengheng123456789/archive/2006/11/29/84343.html
?
虽然能够建立一个自定义的console,可我的问题并不在这里,而是将从后台获取的字符串在控制台MessageConsole中输出的时候,显示中文是乱码的问题;困扰了半天,首先来看MessageConsole:?
?
?
?
org.eclipse.ui.console.MessageConsole.MessageConsole(String name, String consoleType, ImageDescriptor imageDescriptor, String encoding, boolean autoLifecycle)
?
Constructs a message console with the given name, type, image, encoding, and lifecycle specification.
null
null
null
if the system default encoding should be used