Home Docs Changes To-do End Users FAQs Getting Started Developers JCL RI Sample Code JavaDOC References |  |
jpos.config/loader (JCL) - Getting Started
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. Directory and Files in the JCL Release Setup and Quick test Multi-Vendor Support (multi-populator) Using the JposEntryEditor (Swing based editor) 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, ...):
<jcl-dir> | Root directory of JCL installation. Contains readme.html pointer and changes.txt files
<jcl-dir>\res | Contain sample resource files...
<jcl-dir>\lib | Contain all JAR files
<jcl-dir>\docs | Contain the white paper doc and other doc directories
<jcl-dir>\docs\html | Contain this set of HTML files
<jcl-dir>\docs\html\jdoc | Contain generated JavaDOC files for this JCL release
<jcl-dir>\sample | Contain the sample JCL service and test application
<jcl-dir>\src | Contain all the JCL source files including simple reference implementation source and JCL enabled JavaPOS controls
<jcl-dir>\res\jpos.properties | An example of the properties file to use with the JCL
<jcl-dir>\lib\jcl.dtd | DTD for the simple XML registry populator
<jcl-dir>\lib\jcl.xml | Sample XML file populator to use with simple XML registry populator and sample service
<jcl-dir>\lib\jcl.jar | Core JCL classes
<jcl-dir>\lib\jcl_simple.jar | JCL simple implementation classes including the JposEntryEditor Swing application
<jcl-dir>\lib\jclall.jar | All JCL classes (i..e. core + simple)
<jcl-dir>\lib\jpos.jar | JCL-enabled JavaPOS controls
<jcl-dir>\lib\jcl_sample.jar | Sample JCL-enabled JavaPOS virtual service + sample Swing application
Setup and Quick Test 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: Create new JposEntries and save them (either serialized or XML, depending on the populator that the JCL is configured to use) Load the current registry and add, remove and edit entries as well as save them. 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: 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. Create a new JposRegistry. Open an existing JposEntry serialization file. Load the entries from the current JposRegistry. 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: implementation class (String) abstraction class (String) device category (String) 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!
Last modified by EMM on 03/07/2001 12:38 AM