User Guide for JavaSample

advertisement
User Guide for Programming
according to the Sample
Contents
1. InstallCreditLine ........................................................................................................................... 2
1.1Topology of CreditLine Environment ..................................................................................... 2
1.2 Installation steps ................................................................................................................... 2
2. Configureand run the Sample ..................................................................................................... 3
2.1 Prerequisites .......................................................................................................................... 3
2.2 Steps toConfigure and Run the Sample ................................................................................. 3
3. Programming according to the Sample ....................................................................................... 4
3.1 Prerequisites .......................................................................................................................... 4
3.2 Steps to Programming according to the Sample .................................................................. 5
4. Troubleshooting .......................................................................................................................... 6
1. Install CreditLine
1.1Topology of CreditLine Environment
1.2 Installation steps
 For Server Side:
1) Log in Machine A (CreditLine Server) in the topology above.
2) Click here to download the “CreditLine4.1Build1102SP49.exe” or higher version.
3) Run CreditLine4.1Build1102SP49.exe file and follow the instructions to complete
the installation of the software.
4) In file “C:\911\Server\FileMonitor.Server.Service.exe.config” change “ServicePort” to
any value that will work on your network. Leave the other settings as the default values.
5) Run “C:\911\Server\InstallServerService.bat” as administrator to start the service on
server side.
6) If necessary, run “C:\911\Server\UnInstallServerService.bat” as administrator to stop
the service on server side.
Note: If you change any settings in the file “FileMonitor.Server.Service.exe.config”, you will
need to restart the service.
 For Client Side:
7) Log in Machine B (CreditLine Client) in the topology above.
8) Click here to download the “CreditLineClient4.1Build1102SP49.exe” or higher
version.
9) Run CreditLineClient4.1Build1102SP49.exe file and finish the installation.
10) In file “C:\911\Client\FileMonitor.Client.Service.exe.config”:
a. Change “FileMonitorServerIPAddress” to the Server Machine A’s IP
address and the port you set on the server the in following format
“127.0.0.1: xxx”, where xxx is the port number.
b. Also, make sure that "FileMonitorDirectory" is set to the same local
message folder on the local drive as set by the API clcSetMessageDir. For
instance, <add key="FileMonitorDirectory" value="..\MESSAGES"/>
would correspond to "C:\911\Messages"
c. Leave the other settings as the default values.
11) Run “C:\911\Client\InstallClientService.bat” as administrator to start the service on the
client side.
12) If necessary run “C:\911\Client\UnInstallClientService.bat" as administrator to stop the
service on Terminal side.
Note: If you change any settings in the file “FileMonitor.Client.Service.exe.config”, you will
need to restart the service.
2. Configure and run the Sample
2.1 Prerequisites


Microsoft .NET Framework 2.0 or higher
CreditLine4.1Build1102SP49 or higher
2.2 Steps to Configure and Run the Sample
This paragraph is to guide you how to configure and run the Sample.
1)
2)
3)
4)
Complete the steps in 1.2,then:
Log in Machine B (CreditLineClient) in the1.1 Topology of CreditLine Environment
Click here to download the sample (JAVA) if needed. Then Unzip the downloaded file.
Please copy “clcjavaapi.jar”, “JavaSample.bat”, “jna.jar”, “*.class” files to
CreditLineClient installation path (The path where CLCAPIW2.dll locates, for
example C:\911\api).
Note: Please overwrite the existing files.
5) Install jdk-7u1-windows-7.0.exe.
6) Please copy the folders “C:\911\BIN” and “C:\911\Data” with all the contents from
server Machine A to client Machine B’s installation path (C:\911).
7) You can run java sample in windows command window,
by typing the command “java JSample”, please refer to the "JavaSample.bat" file for the
pre configurations.
8) Double click JavaSample.bat to run the javaSampleas the following screenshot:
3. Programming according to the Sample
3.1 Prerequisites


Microsoft .NET Framework 2.0 or higher
CreditLine4.1Build1102SP49 or higher
3.2 Steps to Programming according to the Sample
This paragraph is to guide you how to programming according to the Sample.
1)
2)
3)
4)
Complete the installation steps in 1.2 then:
Log in Machine B(CreditLine Client)in the1.1 Topology of CreditLine Environment.
Click here to download the sample (JAVA) if needed, then Unzip the downloaded file.
Please copy “clcjavaapi.jar”, “jna.jar” files to CreditLineClient installation path
(C:\911\bin).
Note1: Please overwrite the existing files.
Note2: Directory "JavaDriver" is the JAVA sample source code.
5) Install jdk-7u1-windows-7.0.exe.
6) Please copy the folders “C:\911\BIN” and “C:\911\Data” with all the contents from
server Machine A to client Machine B’s installation path (C:\911).
7) Add reference to the clcjavaapi.jar library.
In "Eclipse IDE", from menu Project->Properties.
In the popup window, go to Libraries tab, and click Add External JARs button, browse to
the path where it contains the clcjavaapi.jar to add the library to project”.
8) After that, you can follow the sample to program.
Note: If you have more than one Client, please call the api “void setClientName(string
ClientName)" to set a different name for each Client before processing any transactions.
4. Troubleshooting

When running the sample application, if you encounter the error “side-by-side… ” .
Please try to install “vcredist_x86.exe” on your environment.
Download