![]()
End Users Developers |
This page will help and guide you on using the JCL. Please see the Sample Code for information on how to write JCL compatible JavaPOS services and on how to configure them. NOTE: this page assumes that you are using the Simple JCL reference implementation. If you are not, then most of this will apply to all implementations but one should refer to the third party provider for details on anything specific to their implementation.
This page is Under Construction (needs updating for 2.0.0 release) Directory and Files in the JCL Release The JCL is released as a InstallShield for Java "setup.class" file. Install by using your current JRE installation by doing: >java setup Follow the GUI install application. This assumes that you are in the directory where the setup.class file is located and that the current directory (i.e. ".") is in your CLASSPATH environment variable. By default the source files are jarred into JAR files. If you want to see the source files then extract the JAR files in the "src" and "sample" directory using the command: >jar xvf <sourceFile>.jar NOTE: the only difference is that in Win32 path separation is "\" but "/" in UNIX and setting environment variables will differ on UNIX depending on what shell you are using. Once the JCL is installed and the sources extracted (assume in <jcl-dir>) you will have the following files and directories (not all the files are listed e.g. html files, ...):
In order to setup the JCL you need to get JCL-enabled services or test using the sample virtual LineDisplay service. In either case the process to setting up the JCL is the same. What will follow is the setup of the JCL for the sample service, but you should be able to extrapolate for other service packages. Setting your CLASSPATH Your CLASSPATH environment variable must have the following JAR files listed: NOTE: If you are using JDK1.1.8 you must have to install swing in your computer and add it in your CLASSPATH. <jcl-dir>\lib\jclall.jar or ( <jcl-dir>\lib\jcl.jar, <jcl-dir>\lib\jcl_simple.jar and <jcl-dir>\lib\jpos.jar) You can set your CLASSPATH with the following command (on Win32): set CLASSPATH=<jcl-dir>\lib\jclall.jar;%CLASSPATH% OR set CLASSPATH=<jcl-dir>\lib\jcl.jar;<jcl-dir>\lib\jcl_simple.jar; and <jcl-dir>\lib\jpos.jar;%CLASSPATH% Either options are equivalent in functionality but not in typing! To do a quick verification that the JCL is installed and setup you can run the simple version applications by issuing the following command at the command prompt: >java jpos.config.Version OR >java jpos.loader.Version The output should be something like the following: JavaPOS jpos.config/loader (JCL) version 1.2.0 EA3 Now you are ready to use it! You can also test the sample service (thereby binding a control to a JCL-enabled service) by following the Sample Code example setup and running instructions. Using the JposEntryEditor (Swing based editor) This part is design to show you how to use JposEntryEditor. The JposEntryEditor is a somewhat intuitive Swing based editor that allows you to:
Setup and running You setup the editor as part of the setting up the simple JCL. You also need to make sure that Swing 1.1 FCS or later is setup with your Java installation. To run the editor open a prompt window and type: >java jpos.config.simple.editor.JposEntryEditor This will run the JCL editor GUI and you will see the following window:
The JposEntryEditor has a JposRegistry that will contain all the entries and their configuration that you will be using during the test. You have three options to load/populate the registry.
You can create or open a JposRegistry with different entries and properties or you can use the default JposRegistry that contains some of the entries. The following screen shots of the editor shows some of its functionality:
After that you are ready to configure all the entries. Adding, modifying and deleting a JposEntry After you load the registry you can add new entries, modify the ones you already have or remove those ones you do not want to have. This is the window to add/modify the JposEntry:
The new entries must have a valid logical name and a service instance factory class. Besides the entries should have the following properties:
The dialog to add/modify a property of the JposEntry is the following: You could add, modify or remove all the entries and their properties that you will be using in your test. After you have all the entries configure, save the JposRegistry to apply the changes. Now you are set to test the devices!
|
||||||||||||||||||||||||||||||||||||||||||
![]() |