Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » stdout and stderr problem
stdout and stderr problem [message #169060] Fri, 16 July 2004 17:42 Go to next message
Eclipse UserFriend
Originally posted by: dtwchiu.hotmail.com

Hi,

I am writing an action that will launch a Java application using the
IVMRunner interface and for some reason, the application does not come up
at all. I stepped through the StandardVMRunner class and it seems all the
arguments and environment variables are set properly. I can also see the
process running using "ps" command, but the UI does not come up nor does
anything get logged into the application log. To help me debug this
problem, I would like to know that if the stdout and the stderr of the
application are automatically pipe out to the console window. If not, how
can I do that. Right now, I am not seeing any output except seeing the
process is running.

Thanks.

David.
Re: stdout and stderr problem [message #169084 is a reply to message #169060] Fri, 16 July 2004 19:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

If you are just launching a vm with nothing fancy but using the
classpath of a project, then you can just use the standard java launch
configuration on your own and setup the parameters and such.

See:

http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html

for how to just launch a vm against a project.

Otherwise you should write your launcher instead. Those when launched
properly will add themselves to the console log. The IVMRunner is now a
class used within launchers. It is not typically used by itself.

See:

http://www.eclipse.org/articles/Article-Launch-Framework/lau nch.html

for how to create your own launcher.


--
Thanks, Rich Kulp

Re: stdout and stderr problem [message #169091 is a reply to message #169084] Fri, 16 July 2004 19:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Make that a correction. If all you want to do is launch a vm then use

>
> See:
>
> http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html
>

it doesn't have to refer to a project in the workspace.

--
Thanks, Rich Kulp

Re: stdout and stderr problem [message #169557 is a reply to message #169084] Tue, 20 July 2004 14:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: turker.keskinpala.vanderbilt.edu

Hi,

When I read your reply, I was working on something similar. I was having the
same problem when I used the VMRunner approach. Thanks for the tip. This
helped me to run my app in debug mode.

I would like to ask a follow-up question. I would like to be able to
programmatically step through the code that I am debugging or get some info
during the debug. For this, I should be able to get the debug events, I
suppose. I know that one has to implement an IDebugEventSetListener to be
able to receive events during debug. However, I cannot figure out how to go
about doing this. When you use IVMRunner.run, it contributes results to
debug targets and processes to the given launch. What happens when using
DebugToolsUI.launch? Well, apparently, I am confused about this.

I will appreciate if you could provide some help with this.

Thanks for your time,
Turker Keskinpala


"Rich Kulp" <richkulp@NO.SPAM.us.ibm.com> wrote in message
news:cd9mre$25g$1@eclipse.org...
> If you are just launching a vm with nothing fancy but using the
> classpath of a project, then you can just use the standard java launch
> configuration on your own and setup the parameters and such.
>
> See:
>
> http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html
>
> for how to just launch a vm against a project.
>
> Otherwise you should write your launcher instead. Those when launched
> properly will add themselves to the console log. The IVMRunner is now a
> class used within launchers. It is not typically used by itself.
>
> See:
>
> http://www.eclipse.org/articles/Article-Launch-Framework/lau nch.html
>
> for how to create your own launcher.
>
>
> --
> Thanks, Rich Kulp
> 
>
Re: stdout and stderr problem [message #169565 is a reply to message #169557] Tue, 20 July 2004 14:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Sorry, can't help with that. I never did that. Maybe somebody else can
answer that question.


> I would like to ask a follow-up question. I would like to be able to
> programmatically step through the code that I am debugging or get some info
> during the debug. For this, I should be able to get the debug events, I
> suppose. I know that one has to implement an IDebugEventSetListener to be
> able to receive events during debug. However, I cannot figure out how to go
> about doing this. When you use IVMRunner.run, it contributes results to
> debug targets and processes to the given launch. What happens when using
> DebugToolsUI.launch? Well, apparently, I am confused about this.
>
> I will appreciate if you could provide some help with this.
>
> Thanks for your time,
> Turker Keskinpala


--
Thanks, Rich Kulp

Re: stdout and stderr problem [message #169657 is a reply to message #169557] Wed, 21 July 2004 09:45 Go to previous messageGo to next message
Eclipse UserFriend
Just register your IDebugEventSetListener with the DebugPlugin. You will
receive all debug events from all registered targets.

Darin

"Turker Keskinpala" <turker.keskinpala@vanderbilt.edu> wrote in message
news:cdjn4v$8nq$1@eclipse.org...
> Hi,
>
> When I read your reply, I was working on something similar. I was having
the
> same problem when I used the VMRunner approach. Thanks for the tip. This
> helped me to run my app in debug mode.
>
> I would like to ask a follow-up question. I would like to be able to
> programmatically step through the code that I am debugging or get some
info
> during the debug. For this, I should be able to get the debug events, I
> suppose. I know that one has to implement an IDebugEventSetListener to be
> able to receive events during debug. However, I cannot figure out how to
go
> about doing this. When you use IVMRunner.run, it contributes results to
> debug targets and processes to the given launch. What happens when using
> DebugToolsUI.launch? Well, apparently, I am confused about this.
>
> I will appreciate if you could provide some help with this.
>
> Thanks for your time,
> Turker Keskinpala
>
>
> "Rich Kulp" <richkulp@NO.SPAM.us.ibm.com> wrote in message
> news:cd9mre$25g$1@eclipse.org...
> > If you are just launching a vm with nothing fancy but using the
> > classpath of a project, then you can just use the standard java launch
> > configuration on your own and setup the parameters and such.
> >
> > See:
> >
> > http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html
> >
> > for how to just launch a vm against a project.
> >
> > Otherwise you should write your launcher instead. Those when launched
> > properly will add themselves to the console log. The IVMRunner is now a
> > class used within launchers. It is not typically used by itself.
> >
> > See:
> >
> > http://www.eclipse.org/articles/Article-Launch-Framework/lau nch.html
> >
> > for how to create your own launcher.
> >
> >
> > --
> > Thanks, Rich Kulp
> > 
> >
>
>
Re: stdout and stderr problem [message #169688 is a reply to message #169657] Wed, 21 July 2004 12:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: turker.keskinpala.vanderbilt.edu

Thanks for your reply. I'll assume the debug target will automatically be
registered when DebugUITools.launch(configuration,ILaunchManager.DEBUG_MODE)
executes. I'll see soon if this is true:-)

Turker



"Darin Wright" <Darin_Wright@ca.ibm.com> wrote in message
news:cdls6p$hl6$1@eclipse.org...
> Just register your IDebugEventSetListener with the DebugPlugin. You will
> receive all debug events from all registered targets.
>
> Darin
>
> "Turker Keskinpala" <turker.keskinpala@vanderbilt.edu> wrote in message
> news:cdjn4v$8nq$1@eclipse.org...
> > Hi,
> >
> > When I read your reply, I was working on something similar. I was having
> the
> > same problem when I used the VMRunner approach. Thanks for the tip. This
> > helped me to run my app in debug mode.
> >
> > I would like to ask a follow-up question. I would like to be able to
> > programmatically step through the code that I am debugging or get some
> info
> > during the debug. For this, I should be able to get the debug events, I
> > suppose. I know that one has to implement an IDebugEventSetListener to
be
> > able to receive events during debug. However, I cannot figure out how to
> go
> > about doing this. When you use IVMRunner.run, it contributes results to
> > debug targets and processes to the given launch. What happens when using
> > DebugToolsUI.launch? Well, apparently, I am confused about this.
> >
> > I will appreciate if you could provide some help with this.
> >
> > Thanks for your time,
> > Turker Keskinpala
> >
> >
> > "Rich Kulp" <richkulp@NO.SPAM.us.ibm.com> wrote in message
> > news:cd9mre$25g$1@eclipse.org...
> > > If you are just launching a vm with nothing fancy but using the
> > > classpath of a project, then you can just use the standard java launch
> > > configuration on your own and setup the parameters and such.
> > >
> > > See:
> > >
> > >
http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html
> > >
> > > for how to just launch a vm against a project.
> > >
> > > Otherwise you should write your launcher instead. Those when launched
> > > properly will add themselves to the console log. The IVMRunner is now
a
> > > class used within launchers. It is not typically used by itself.
> > >
> > > See:
> > >
> > > http://www.eclipse.org/articles/Article-Launch-Framework/lau nch.html
> > >
> > > for how to create your own launcher.
> > >
> > >
> > > --
> > > Thanks, Rich Kulp
> > > 
> > >
> >
> >
>
>
Re: stdout and stderr problem [message #170098 is a reply to message #169091] Mon, 26 July 2004 17:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dtwchiu.hotmail.com

Rich,

Thanks for your response. I followed the instruction and my app is able
to come up fine. However, there is one remaining problem which causes an
error in my application (the socket problem I posted later in this
newsgroup).

My application does not work properly when my custom jar files are placed
in front of the jre jars in the bootpath. I am wondering how to make sure
the jre jars are in front of my jars in the bootpath. Is this something
related to the "/a" in the bootpath? How to make sure that happens
programmatically in eclipse?

David.

Rich Kulp wrote:

> Make that a correction. If all you want to do is launch a vm then use

> >
> > See:
> >
> > http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html
> >

> it doesn't have to refer to a project in the workspace.
Re: stdout and stderr problem [message #170106 is a reply to message #170098] Mon, 26 July 2004 17:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dtwchiu.hotmail.com

Please disregard my question. The ordering of the bootpath is the same as
the ordering in the list that is being set to ATTR_CLASSPATH.

David.

David Chiu wrote:

> Rich,

> Thanks for your response. I followed the instruction and my app is able
> to come up fine. However, there is one remaining problem which causes an
> error in my application (the socket problem I posted later in this
> newsgroup).

> My application does not work properly when my custom jar files are placed
> in front of the jre jars in the bootpath. I am wondering how to make sure
> the jre jars are in front of my jars in the bootpath. Is this something
> related to the "/a" in the bootpath? How to make sure that happens
> programmatically in eclipse?

> David.

> Rich Kulp wrote:

> > Make that a correction. If all you want to do is launch a vm then use

> > >
> > > See:
> > >
> > > http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html
> > >

> > it doesn't have to refer to a project in the workspace.
Re: stdout and stderr problem [message #170114 is a reply to message #170098] Mon, 26 July 2004 17:49 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

How are you adding them to your classpath? Are you making them system
type classpath entries in java build path? If so, then just make sure
they are after the JRE_CONTAINER or JRE_LIB entries in the classpath.


--
Thanks, Rich Kulp

Previous Topic:weird word jumping behavior
Next Topic:Plugins: J2EE support?
Goto Forum:
  


Current Time: Sun Jun 08 13:28:58 EDT 2025

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

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

Back to the top