Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

calling a java program on as400 from visual basic

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • calling a java program on as400 from visual basic

    Does any one know how can i call a java program that resides on the as400 from a visual basic com component. I can call a cl or rpg program by using client access express remote program object by using a function like this: ------------------------------------------------------------------- Public Function getSystemDate() As String Dim ObjProgram As New cwbx.Program, ObjParams As cwbx.ProgramParameters Dim strRetcode As String, strSysDate As String, strSysTime As String On Error GoTo Failed ' Set the System property of the Program object Set ObjProgram.System = getAs400System() ' Set the LibraryName property of the Program object ObjProgram.LibraryName = "mylib" ' Set the ProgramName property of the Program object ObjProgram.ProgramName = "myprogram" 'Program Params Set ObjParams = New cwbx.ProgramParameters ObjParams.Append "RetCode", cwbrcOutput, 3 ObjParams.Append "SysDate", cwbrcOutput, 8 ObjParams.Append "SysTime", cwbrcOutput, 6 Call ObjProgram.Call(ObjParams) strRetcode = StrCvtr.FromBytes(ObjParams.Item("RetCode").Value) strSysDate = StrCvtr.FromBytes(ObjParams.Item("SysDate").Value) strSysTime = StrCvtr.FromBytes(ObjParams.Item("SysTime").Value) getSystemDate = strRetcode & strSysDate 'MsgBox "Parameter RetCode = " & 'MsgBox "Parameter SysDate = " & 'MsgBox "Parameter SysTime = " & Exit Function Failed: getSystemDate = "AAA" Call ErrorHandler End Function ----------------------------------------------------------------------- But when it comes to java which is the ObjProgram.LibraryName that i should give or where can i put the class and the method i want to call. Where do i put the class path ? thanx in advance
Working...
X