View System.out messages

The ActiveX to enterprise beans bridge does not have a console available that you can use to view Java System.out messages. To view these messages when you run a stand-alone client program (such as Visual Basic), redirect the output to a file when you launch the client. For example:

launchClientXJB.bat MyProgram.exe > output.txt

To view the System.out messages when you run a Service program such as Active Server Pages, override the Java System.out OutputStream object to FileOutputStream. For example, in VBScript:

  ' Redirect system.out to a file
  ' Assume that oXJB is an initialized XJB.JClassFactory object
    Dim clsSystem
    Dim oOS
    Dim oPS
    Dim oArgs

  ' Get the System class
    Set clsSystem = oXJB.FindClass("java.lang.System")

  ' Create a FileOutputStream object
  ' Create a PrintStream object and assign to it our FileOutputStream
    Set oArgs = oXJB.GetArgsContainer  oArgs.AddObject "java.io.OutputStream", oOS
    Set oPS = oXJB.NewInstance(oXJB.FindClass("java.io.PrintStream"), oArgs)

  ' Set our System OutputStream to our file
    clsSystem.setOut oPS