Launching a Program in JavX

In this section, you will run learn how to run ProvideX programs from the Workbench in the JavX thin client. Prior to running the DemoApp, please do a clean build and make sure there are no errors. For more information on building the project see Getting Started > Project Tutorial > Building ProvideX Projects > Build the DemoApp Project.

  1. From the Workbench toolbar, select Run > Run Configurations...

  2. The Run Configurations dialog opens. This allows you to configure how a program is launched, including its arguments and other options.

  3. Right click the JavX Client from the list of launch configurations and select New Configuration.

  4. The JavX Client launch configuration dialogue will appear. The JavX Client launch configuration dialogue as eight tabs:

    Note: Four of the eight JavX Client tabs are taken from the WindX Client launch configuration.

The Application Tab

The Following fields reside on the Application tab (below the Name field): ProvideX project, ProvideX program to run, ProvideX Executable, and Working Directory.

  1. Enter "JavX DemoApp" in the Name field

  2. In the ProvideX project section, click the Browse button and select the DemoApp project.

  3. In the ProvideX program to run section click on the Search button. Browse to and select the menu program in the project's output directory; e.g., browse to the file: compiled\prog\menu.

    Note: Do not select the menu file in the input directory.

  4. Accept the default ProvideX executable which will be the one that was selected for the workspace during the configuration of the ProvideX plug-in.

  5. In the Working Directory section, the default value will be the root directory for the workspace; simply add the name of the project output directory (DemoApp\compiled) to the end of the default value

  6. When the Application tab is done, click Apply.

The Arguments Tab

The following fields reside on the Arguments tab: Program Arguments, Path to Ini file, and Window state.

  1. Select the Arguments tab.

  2. By default, the program will use the project's default ini file. The project's default ini file is found in the project's root directory. For more information on the default ini file see Project Tutorial > Creating a ProvideX Project. To specify an ini file use the Search button, browse to, and select a ProvideX ini file located in any directory. This application will run with the default ProvideX ini file so leave this field blank.

  3. Enter "-hd" in the Window state field so that the main window of ProvideX is hidden when the the menu program is run

  4. When the Arguments tab is done, click Apply.

The Client Tab

The following mandatory fields reside on the Client tab: ProvideX host and Port number for host. There are also a number of optional fields. See the concepts section of this document for more on the Client tab's Optional fields.

  1. Select the Client tab.

  2. Simply check box beside the option Automatically launch ProvideX host locally on any free socket.

  3. The Client tab is done, click Apply.



The Classpath Tab

Several of the JavX client launch configuration tabs are optional and not used in this tutorial. The tabs covered above and the Classpath tab are the only tabs with mandatory fields.

  1. Select the Classpath tab.

  2. Select User Entries from the list of Classpaths.

  3. Click the Add External JARs... button.

  4. Browse to the JavXPlugin jar file you want to use. The JavXPlugin.jar is found in the Eclipse plugins directory.

  5. When the Classpath tab is done, click Apply.

  6. Click the Run button on the Eclipse JavX launch configuration dialogue.

    Note: The DemoApp demo program uses a COM control. JavX does not support these controls. The application may not run in JavX; if it does run, you will encounter some errors.

  7. Exit the ProvideX menu program

  8. To re-run this program, pres Ctrl+F11 or click the run icon on the Workbench toolbar.