How to get system.out from Java to C++?

My Java class, if ran in the command line, displays some text with System.out.println. But when I invoke that class from C++ using JNI, that string is nowhere to be found. Can someone help me on how to get that output into my C++?

The java class is invoked in my C++ as such:

env->CallStaticVoidMethod(myClass, mainMethod, applicationArgs);

Any help is appreciated. Thanks!

[401 byte] By [yatingga] at [2007-10-3 1:36:21]
# 1
String?If the output isn't showing up in the console it suggests one of the following....1. The C++ is attempting to redirect stdout. Although that is probably possible is very difficult to get java to go along with that.2. The line isn't getting executed.
jschella at 2007-7-14 18:34:28 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

As far as I can tell, the lines in Java are being executed when called from C++ because I inserted code to write the System.out.println statements to a text file and it seem to be executing those.

The reason why I need that output is to figure out why my java class can be ran from the command line successfully, but it doesn't seem like it executes properly when invoked from C++. Is there any other way to debug this?

yatingga at 2007-7-14 18:34:28 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3
Nevermind. I figured out that it's the parameters that I'm passing in are bad...Thanks for your reply.
yatingga at 2007-7-14 18:34:28 > top of Java-index,Java HotSpot Virtual Machine,Specifications...