Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Writing to Console
Writing to Console [message #157004] Fri, 14 November 2003 18:21 Go to next message
Eclipse UserFriend
Originally posted by: mcfaddin.us.ibm.com

I am developing a new plug-in which writes messages to stdout and stderr.
I am building the plug-in, exporting its JAR and plugin.xml files to the
eclipse\plugins directory and restarting the Eclipse environment.

However I am not seeing the output in the console viewer.

I have both options "Show when program writes to standard out" and "Show
when program writes to standard error" checked in the dialog
Window->Preferences->Debug->Console.

Is there another flag that needs to be thrown somewhere?
Re: Writing to Console [message #157029 is a reply to message #157004] Fri, 14 November 2003 18:39 Go to previous messageGo to next message
David Whitehurst is currently offline David WhitehurstFriend
Messages: 76
Registered: July 2009
Member
Try running your eclipse by starting it in a terminal using java.exe and not
javaw.exe. You will see your output on the terminal window. I don't think
that stdout normally goes to the console. I may be wrong.

David

--
David L. Whitehurst
aka. PiratePete
http://www.piratepetesoftware.com
dlwhitehurst@comcast.net
"Scott McFaddin" <mcfaddin@us.ibm.com> wrote in message
news:bp36g6$fhp$1@eclipse.org...
> I am developing a new plug-in which writes messages to stdout and stderr.
> I am building the plug-in, exporting its JAR and plugin.xml files to the
> eclipse\plugins directory and restarting the Eclipse environment.
>
> However I am not seeing the output in the console viewer.
>
> I have both options "Show when program writes to standard out" and "Show
> when program writes to standard error" checked in the dialog
> Window->Preferences->Debug->Console.
>
> Is there another flag that needs to be thrown somewhere?
>
>
Re: Writing to Console [message #157171 is a reply to message #157004] Fri, 14 November 2003 22:16 Go to previous messageGo to next message
Del Myers is currently offline Del MyersFriend
Messages: 69
Registered: July 2009
Member
I'm pretty sure that "Show when program writes to standard out" only means
"programs that are children of Eclipse"; i.e. programs launched from within
Eclipse (this does not include plugins).

I would suggest logging your message to the PDE log (plugins come with a
log(IStatus) method). Or, you could create two new OutputStreams (one for
your plugin error, and one for your plugin out) wrapped in IStreamMonitors.
And have those wrapped in an IStreamsProxy which can be connected to the
console via Console.connect(IStreamsProxy).


Check out the API for org.eclipse.debug.ui.console.

Del.


"Scott McFaddin" <mcfaddin@us.ibm.com> wrote in message
news:bp36g6$fhp$1@eclipse.org...
> I am developing a new plug-in which writes messages to stdout and stderr.
> I am building the plug-in, exporting its JAR and plugin.xml files to the
> eclipse\plugins directory and restarting the Eclipse environment.
>
> However I am not seeing the output in the console viewer.
>
> I have both options "Show when program writes to standard out" and "Show
> when program writes to standard error" checked in the dialog
> Window->Preferences->Debug->Console.
>
> Is there another flag that needs to be thrown somewhere?
>
>
Re: Writing to Console [message #157229 is a reply to message #157171] Sat, 15 November 2003 03:57 Go to previous message
Tim Williams is currently offline Tim WilliamsFriend
Messages: 21
Registered: July 2009
Junior Member
Enough people seem to ask this question, but I guess nobody has actually
raised a feature request.

You need to launch a 'program' from within your plugin. Any output your
program has to stdout / stderr will then go to the Console view. There are
articles on the Eclipse website that explain how to launch a program, see
Launching Java Applications Programmatically Darin Wright (IBM) August 26,
2003

Note that the Console is part of the Debug component of Eclipse. When I
looked I couldn't find a straightforward API call that you can use instead
of System.out.println() and thereby avoid the launching framework.

Tim.

"Del" <delmyers@cs.uvic.ca> wrote in message
news:bp3jcj$uj1$1@eclipse.org...
> I'm pretty sure that "Show when program writes to standard out" only means
> "programs that are children of Eclipse"; i.e. programs launched from
within
> Eclipse (this does not include plugins).
>
> I would suggest logging your message to the PDE log (plugins come with a
> log(IStatus) method). Or, you could create two new OutputStreams (one for
> your plugin error, and one for your plugin out) wrapped in
IStreamMonitors.
> And have those wrapped in an IStreamsProxy which can be connected to the
> console via Console.connect(IStreamsProxy).
>
>
> Check out the API for org.eclipse.debug.ui.console.
>
> Del.
>
>
> "Scott McFaddin" <mcfaddin@us.ibm.com> wrote in message
> news:bp36g6$fhp$1@eclipse.org...
> > I am developing a new plug-in which writes messages to stdout and
stderr.
> > I am building the plug-in, exporting its JAR and plugin.xml files to the
> > eclipse\plugins directory and restarting the Eclipse environment.
> >
> > However I am not seeing the output in the console viewer.
> >
> > I have both options "Show when program writes to standard out" and "Show
> > when program writes to standard error" checked in the dialog
> > Window->Preferences->Debug->Console.
> >
> > Is there another flag that needs to be thrown somewhere?
> >
> >
>
>
Previous Topic:Why "WARNING: Duplicate name in Manifest" on PDE launch?
Next Topic:UI for new Builder
Goto Forum:
  


Current Time: Thu Nov 21 15:26:35 GMT 2024

Powered by FUDForum. Page generated in 0.03629 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top