• Post Reply Bookmark Topic Watch Topic
  • New Topic

Capture java stdout when running the JVM through JNI in C++

 
Warren Rosenau
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am running the JVM from C++ using JNI. This will be running as a service and I want to capture the system.out.println(xx) output from C++.
The vfprintf hook does not work for me and I have seen a few posts on javasoft.com confirming that it does not work.
If it was using the standard stdout I would be in good shape but it is not!
Help!
 
Eddy Chang
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Warren,
I don't have an answer to your question, but I would be interested in hearing what environment you application is being developed in (windows or unix), and which parts of your program you are programming in java and which parts in c++.
I thinking about writing a client ui application in win32 and using JNI to run a JVM so that I can program the networking component using JMS in java. I know that everyone will probably say to program the entire thing in java with swing, but i'm just thinking about this idea.
Eddy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!