Java client

The Java(TM) Client Sample Application can run as an application in a Java Virtual Machine provided the client machine has a Java runtime environment such as the Java Plug-in 1.3. The class that starts the toolkit client component is OpenDesktop, and it is responsible for the following tasks:

  1. Resetting the context hierarchy [1]
  2. Initializing the externalizers [2]
  3. Creating the initial context hierarchy [3]
  4. Creating and initializing the application desktop[4]
  5. Starting the client side of the Client/Server Service [5]
The following code is used to accomplish these tasks:
Context.reset(); [1]
Settings.reset(iniPath);
Settings.initializeExternalizers(Settings.MEMORY); [2]
Context ctxt = (Context) Context.readObject("workstationCtx"); [3]
createAndInitializeDesktop(); [4]
establishServerSession(); [5]

The code above is executed when the OpenDesktop class is initialized. This class requires the path to the configuration file as a parameter. The configuration file (by default, dse.ini) contains a set of required toolkit definitions, including the path to the other entity definition files. To minimize the code and resources installed on the client, the configuration file and the other definitions files are installed on the server (the files are part of BTTJavaSampleWeb) and downloaded to the client when the OpenDesktop is executed.