BBjAdminEnvironment::setClasspath

Description

In BBj 9.0 and higher, this BBjAdminEnvironment method configures the value of a classpath name.

Syntax

Return Value

Method

void

setClasspath(string p_name, BBjVector p_value)

Parameters

Variable

Description

p_name

The name of the classpath to set.

p_name

The new value for the classpath.

Return Value

None.

Remarks

Set the classpath to make p_name accessible as an argument to the -CP command line option of BBj. If a classpath named p_name already exists, any subsequent sessions started from the command line, Web start or applet will contain the new settings. Calls to newBBjSession() and SCALL() will continue to use the existing classpath value of the parent session unless explicitly set.

Passing an empty string for p_name will set the default session classpath. BBjServices will add system jars automatically. Including them will result in an !ERROR=17.

Example

INPUT "Enterprise Manager Admin Login: ", user$
INPUT "Password: ",'EE', passwd$, 'BE'

rem ' Create a vector with some new jar file names.
DECLARE BBjVector myVector!
myVector! = BBJAPI().makeVector()
myVector!.addItem("/testing/newjar.jar")
myVector!.addItem("/testing/utils.jar")

rem ' Set the value of the "test" classpath with the vector
DECLARE BBjAdminEnvironment env!
env! = BBjAPI().getAdmin(user$, passwd$).getEnvironment()
env!.setClasspath("test", myVector!)

See Also

BBjAPI

BBjAdminEnvironment

BBjAdminEnvironment::getClasspath

BBjAdminEnvironment::getFullClasspath

BBjAdminEnvironment::reloadClasspath

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.