Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to redirect stdout/stderr from JVM launched in a C code

843829Aug 12 2005 — edited Aug 12 2005
Hi all,

we have an hybrid application C++/Java. The JVM is launched from
C++ and then JNI is used in both direction from/to Java to/from C++.

The problem is that we suspect we have exceptions, not cautched
by our trace system (log4J). This can be for instance null pointer
exception that we cannot catch unless all methods are wrapped
into an expensive try/catch for all.

The question is: is it possible to redirect the stderr and stdout of
the JVM to a console or file so that we may have a chance to check
if we have an exception and where.
We are running under XP.

Thanks for all,

Xavier.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 9 2005
Added on Aug 12 2005
1 comment
10,256 views