![]()
End Users Developers |
This section will describe the sample JCL-enabled JavaPOS service and sample application that should constitute a better verification test for the JCL installed and be a stating point for service writers. Setting up, configuration and running To setup the JCL sample code, you need to make sure that the jcl_sample.jar file is in your CLASSPATH. See the Getting Started on how to setup the JCL JAR files. Sources: s extract the jcl_sample_src.jar file in the "sample" directory to get the source to the sample JCL test application. Use the following command with the jar utility found in Java 2 (issued in the "sample" directory): >jar xvf jcl_sample_src.jar Run the TestApp by issuing the following command: >java com.xyz.TestApp Once you launch the application you will see the following screen: Type in the logical name (use "LineDisplay0" if using the XML populator or "com.xyz.MyLD" if not) then Click on "Open" then "Claim" then check "DeviceEnabled" box. You should see the "virtual" 2x20 line display frame. Display text in it by typing the text and clicking on the "displayText" button. It should look something like this: PS: turn tracing ON to see any errors that might occur while loading the app and while the JCL looks for the entries file or for any errors that could happen. Do this by defining the property jpos.util.tracing.TurnOnAllNamedTracers to ON or TRUE that is set: jpos.util.tracing.TurnOnAllNamedTracers = ON in the jpos.properties file. Sample Virtual LineDisplay service The key points to understand about the com.xyz.jpos.LineDisplay service in the sample code are:
Compile the sample sources by issuing following command in the "sample" directory: >javac com/xyz/*.java >javac com/xyz/jpos/*.java
|
||||
![]() |