GetJavaClasspath
Description
Gets the classpath of the current Java VM.
Syntax
|
1 |
javavm.getJavaClasspath( ) |
Return value
String
Examples
This example shows how to use GetJavaClasspath to get the
classpath when the JVM is started and write it to a log file:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
// instance variables: // JavaVM i_jvm // boolean i_jvm_started = false // string is_classes //Start JavaVM and Prepare to Connect to EJB server string classpath Integer li_ret //create JAVAVM if ib_jvm_started = false then i_jvm = create javavm classpath = is_classes li_ret = i_jvm.createJavaVM(classpath, true) if li_ret = -1 then MessageBox("Error", "Failed to load JavaVM") end if if li_ret = -2 then MessageBox("Error", "Failed to load EJBLocator") end if ib_jvm_started = true integer li_FileNum string ls_classpath, ls_string li_FileNum = FileOpen("C: empclasspath.log", & LineMode!, Write!, LockWrite!, Append!) ls_classpath = i_jvm.getjavaclasspath() ls_string = String(Today()) + " " + String(Now()) ls_string += ": ~r~n" + ls_classpath + "~r~n" FileWrite(li_FileNum, ls_string) FileClose(li_filenum) end if |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest