Star 39652190 User Manual

Star JavaPOS Driver
for mCollection
- Software Manual -
Rev. 1.0
Contents
1. Getting Started ............................................................................................ 3
2. Operating Environment ............................................................................. 4
2.1 Operating System ........................................................................................................ 4
2.2 Java Operation Environment .................................................................................... 4
2.3 Supported Models ....................................................................................................... 5
3. Installation .................................................................................................... 6
4. JavaPOS Driver Settings ............................................................................. 7
4.1 Common Settings ........................................................................................................ 8
4.2 POS Printer Connection Settings ............................................................................ 11
4.3 CashDrawer Connection Settings ..........................................................................12
5. Sample Program ........................................................................................ 13
6. Service Objects .......................................................................................... 17
6.1 POS Printer ..................................................................................................................17
6.2 Cash Drawer ................................................................................................................24
7. Version History ........................................................................................... 26
Notice
Windows is a registered trademark of Microsoft Corporation.
Mac, MacOS, MacBook, iMac are trademarks of Apple Inc., registered in the U.S. and other countries.
Company and product names are trademarks or registered trademarks of their respective companies.
Reproduction of any part of this documentation is prohibited.
The contents of this documentation are subject to change without notice.
We can assume no responsibility for any results which may come out of the usage instructed in this documentation.
©2018 Star Micronics Co., Ltd.
Star JavaPOS Driver Software Manual

1. Getting Started

Star JavaPOS driver offers full compliance with the JavaPOS Ver. 1.13. This manual supports the following Star JavaPOS driver packages.
starjavapos_mCollection_1.13.x*_windows_32bit.zip
starjavapos_mCollection_1.13.x*_windows_64bit.zip
starjavapos_mCollection_1.13.x*_linux_32bit.zip
starjavapos_mCollection_1.13.x*_linux_64bit.zip
starjavapos_mCollection_1.13.x*_mac.zip * x : Version No.
This manual describes the setup procedures, specifications, and limitations of the Star JavaPOS driver, which is used to run Star mCollection printers and peripheral devices.
This manual is intended for developers who design application systems that use JavaPOS devices. The manual assumes that the reader is familiar with the following topics.
General specications of the JavaPOS 1.13.
General specications of the Star POS Printers.
Java terminology and architecture.
The host operating system.
Target Model and Firmware Versions
Target Model Printer F/W
MCP31LB, MCP31L Ver 1.0 or later
MCP20, MCP20B Ver 1.0 or later
MCP21LB Ver 1.0 or later
POP10 Ver 1.0 or later
- 3 -

2. Operating Environment

2.1 Operating System

This software supports the following operating systems.
Windows 10* 32-bit and 64-bit (except Windows 10 Mobile and Windows 10 IoT Core)
Windows 8.1* 32-bit and 64-bit (except Windows RT 8.1) Windows 8 * 32-bit and 64-bit (except Windows RT) Windows 7 32-bit and 64-bit
Limitation for Windows 8/8.1/10
*
- Windows UI (Modern UI) do not support.
Linux 32-bit and 64-bit*
- Red Hat Enterprise Linux
- openSUSE
- Fedora
- ubuntu
- CentOS
*The latest evaluation environment, please check the readme_en.txt .
Star JavaPOS Driver Software Manual
macOS 10.13
macOS 10.12 Mac OS X 10.11 Mac OS X 10.9

2.2 Java Operation Environment

This driver is compatible with Java Runtime Environment (JRE) Ver. 1.4.2 and later, but we recommend that you use Java Runtime Environment (JRE) Ver. 1.5 or later.
On Windows OS, set the PATH variable if you want to be able to conveniently run the JDK executables (javac. exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. To set the PATH permanently, add the full path of the following directory to the PATH variable.
<JDK installation directory>\bin
Example: C:\Program Files\Java\jdk1.6.0_18\bin
- 4 -
Star JavaPOS Driver Software Manual

2.3 Supported Models

The driver supports the operating systems and interfaces listed below.
Models Linux OS Windows OS Mac OS
MCP31LB (MCP31) USB / Ethernet / Bluetooth
*1
USB / Ethernet / Bluetooth
MCP31L (MCP31) USB / Ethernet USB / Ethernet USB / Ethernet
MCP20 (MCP20) USB / Ethernet USB / Ethernet Ethernet
*1
MCP20B (MCP20) USB / Ethernet / Bluetooth
MCP21LB (MCP21) USB / Ethernet / Bluetooth
POP10 USB / Bluetooth
*1
The communication of Bluetooth interface is "SPP".
*1
USB / Ethernet / Bluetooth
*1
USB / Ethernet / Bluetooth
USB / Bluetooth
*1
USB / Ethernet / Bluetooth
*1
*1
*1
Ethernet / Bluetooth
USB / Ethernet / Bluetooth
USB / Bluetooth
*1
*1
*1
*1
- 5 -

3. Installation

Install the 32-bit or 64-bit driver, whichever is appropriate for your Java runtime environment.
1. Uncompress this package.
2. Files which are existed in unzipped package is able to put on a particular place.
Files : “class libraries(jar le)” “le of JavaPOS driver settings (jpos.xml)”] “les which are related to test application(java , gif, dll le(Windows), dylib le(Mac))”
* If do not need to put on particular place, be able to place les at same package)
* Library le(dll, dylib) needs to put on a folder which exists test application or a folder which is added path
environment.
ex. Particular place :
<Windows>
jar le - “C:\Program Files\JavaPOS\lib” xml, java, gif, dll - “C:\Program Files\JavaPOS\bin”
Star JavaPOS Driver Software Manual
<Linux> <Mac>
jar le - “/usr/local/javapos/lib” xml, java, gif, dylib(Mac) - “/usr/local/javapos/bin”
* (Only Linux) Need to install StarIO. Run “install.sh” which is in
“StarIOPort_Install_x32(64)” folder of the unzipped package by administrator authority. Refer to readme.txt for detail.
On 64-bit operating systems, you can use either the 32-bit or the 64-bit Java runtime environment. Install the appropriate version of the Star JavaPOS driver for your Java runtime environment.
Example :
When using the 32-bit Java runtime environment on a 32-bit OS: Use the 32-bit driver.
When using the 32-bit Java runtime environment on a 64-bit OS: Use the 32-bit driver.
When using the 64-bit Java runtime environment on a 64-bit OS: Use the 64-bit driver.
- 6 -
Star JavaPOS Driver Software Manual

4. JavaPOS Driver Settings

The Star JavaPOS Driver uses the JCL - Java Configuration Loader system for configuring the provided services. The file jpos.xml contained in this package has been prepared with device entries for Star's printer products. Refer to the followings and adjust jpos.xml to fit the environment of use.
The following is a setting example of MCP31POSPrinter and CashDrawer.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE JposEntries PUBLIC "-//JavaPOS//DTD//EN" "jpos/res/jcl.dtd">
<JposEntries>
<JposEntry logicalName="POSPrinter_windows_Bluetooth">
<creation factoryClass="com.starmicronics.starjavapos.ServiceInstanceFactory"
serviceClass="com.starmicronics.starjavapos.POSPrinterService" />
<vendor name="Star Micronics" url="www.star-m.jp/eng/index.htm" />
<jpos category="POSPrinter" version="1.13" />
<product description="Star receipt printer">
name="Star Micronics POSPrinter controller"
url="www.star-m.jp/eng/index.htm" />
<prop name="model" type="String" value="MCP31" /> ...
<prop name="portName" type="String" value="BT:COM10" /> ...
<prop name="portSettings" type="String" value="" /> ...
<prop name="ioTimeoutMillis" type="Integer" value="5000" /> ...
</JposEntry>
<JposEntry logicalName="CashDrawer_Windows_Bluetooth">
<creation factoryClass="com.starmicronics.starjavapos.ServiceInstanceFactory"
serviceClass="com.starmicronics.starjavapos.CashDrawerService" />
<vendor name="Star Micronics" url="www.star-m.jp/eng/index.htm" />
<jpos category="CashDrawer" version="1.13" />
<product description="Printer controlled cash drawer"
name="Star Micronics cash drawer controller"
url="www.star-m.jp/eng/index.htm" />
<prop name="portName" type="String" value="BT:COM10" />
<prop name="portSettings" type="String" value="" />
<prop name="capStatus" type="Boolean" value="True" />
<prop name="signalLevelHighWhenDrawerOpen" type="Boolean" value="True" />
1
2
3
4
</JposEntry>
</JposEntries>
- 7 -
Star JavaPOS Driver Software Manual

4.1 Common Settings

Enter the following settings according to the connection method of your device.
Model Name Setting ...
ex. <prop name="model" type="String" value="MCP31" />
Please input the appropriate model name which you would like to use. Supported model names are as following.
MCP31, MCP20, MCP21, POP10
Note: You do not have to enter this property on cash drawer devices.
Port Name / Port Settings ...
ex. <prop name="portName" type="String" value="usbprn:Star MCP31" /> <prop name="portSettings" type="String" value="" />
1
2
Enter the printer's port name and port settings that are appropriate for your operating system and interface.
USB - Printer Class
[portName]
Two dierent port name parameter forms are accepted.
1. Do not specify the port name
2. Specifying USB serial number
The "1." is useful when you are using only one printer and your printer does not have a USB serial
number set (which is the default setting). The "2." is useful when you are using multiple printers.
1. Do not specify the port name
<Windows>
The port name parameter is formed by combining "usbprn:" with your printer's Windows printer queue name. For the sample program attached, the printer queue name was created with 1 byte character however, two byte characters also can be used. For example, when you want to specify a Windows queue name as "Star MCP31", you may create it as:
*Windows not supported
"usbprn:Star MCP31"
<Linux> <Mac>
The port name parameter is formed by combining "usbprn:" with your printer's model name. For example, when you want to specify a model name as "MCP31", you may create it as:
"usbprn:MCP31"
- 8 -
2. Specifying USB serial number * Windows not supported.
"usbprn:XXXXXXXX"
"usbprn:" causes StarIO to open the printer with the serial number you've specied. This is useful in two scenarios:
· To avoid new ports being created when the printer is connected to the computer's different USB ports.
· When you have multiple printers connected simultaneously, your printer can be identied.
Note: Star's printers do not have USB serial numbers configured from the factory
default. You will have to write a serial number into the device in order to use this functionality.
[portSettings]
The port settings parameter must be an empty string.
Star JavaPOS Driver Software Manual
Ethernet
[portName]
[portSettings]
The port name parameter is formed by combining "TCP:" with your printer's IP address. For example, if your printer is established on the 192.168.1.102 address then you would pass
"tcp:192.168.1.102"
The port settings parameter must be an empty string.
- 9 -
Loading...
+ 18 hidden pages