Network Deployment (Distributed operating systems), v8.0 > Reference > Developer examples
Example: Viewing a System.out message
The ActiveX to EJB bridge does not have a console available to view Java System.out messages.
To view these messages when running a stand-alone client program (such as Visual Basic), redirect the output to a file.
This example redirects output to a file:
launchClientXJB.bat MyProgram.exe > output.txt
To view the System.out messages when running 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
Develop ActiveX client application code