JavaLoadString Function

Action

Instantiates a Java string object and returns a handle on it. The Java string must be released by the JavaFreeObject() command.

Include file

Java.bdh

Syntax

JavaLoadString( in sInitValue : string,
                in sTimerName : string optional ): number;

Return value

Handle on the Java string.

Parameter Description
sInitValue Init value of the string to create.
sTimerName

(optional)

Creates a custom time measure with the specified name for this function.

Example

  transaction TInit
  begin
    JavaCreateJavaVM();
    JavaUserInit("SilkPerformerUser");
  end TInit;

  transaction TMyJavaTrans
  var
    hObj     : number;
    hJKeyStr : number;
  begin
    hJKeyStr := JavaLoadString("hello");
                
    ThinkTime(0.2);
    JavaCallMethod(JavaGetUserObject(), "myComplexMethod");
    hObj := JavaGetObject(JavaGetUserObject());
  end TMyJavaTrans;