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 specications of the JavaPOS 1.13.
▪
General specications of the Star POS Printers.
▪
Java terminology and architecture.
▪
The host operating system.
▪
Target Model and Firmware Versions
Target Model Printer F/W
MCP31LB, MCP31LVer 1.0 or later
MCP20, MCP20BVer 1.0 or later
MCP21LBVer 1.0 or later
POP10Ver 1.0 or later
- 3 -
Page 4
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 -
Page 5
Star JavaPOS Driver Software Manual
2.3 Supported Models
The driver supports the operating systems and interfaces listed below.
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 -
Page 6
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
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 -
Page 7
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">
Enter the printer's port name and port settings that are appropriate for your operating system and
interface.
USB - Printer Class
【
[portName]
Two dierent 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 -
Page 9
2. Specifying USB serial number * Windows not supported.
"usbprn:XXXXXXXX"
"usbprn:" causes StarIO to open the printer with the serial number you've specied.
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 identied.
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 -
Page 10
Star JavaPOS Driver Software Manual
Bluetooth
【
Pairing with the printer device in advance. Also after pairing, make sure that as following.
<Windows>
Make sure that is showed the ”Standard Serial over Bluetooth link (COM X)”(X is number) at
“Computer”(right click) > manage > Device Manager > “Ports (COM & LPT)”.
<Linux>
At “Terminal”, perform the following command.
As administrator authority, run the following commands.
】
hcitool scan (Search a Bluetooth Device, Check a MAC Adress of a Bluetooth Device)
There is the possibility of unintended printing occurring after pairing with the printer.
This is caused by ModemManager. Disable it or take other suitable action.
<Mac>
At “Terminal”, perform the following command.
ls /dev/ | grep “tty\.”
(Check a device le which is /dev/tty.XXXXXXXX-SPP(XXX is string.))
[portName]
Refer to above for how to determine a COM number.
<Windows>
Specifying the port name like “BT:COM10” or ”BT:COM11”.
<Linux>
Specifying the rfcomm port name like “/dev/rfcommX”(X is number).
<Mac>
Specifying the port name like “/dev/tty.XXXXXXX”.
[portSettings]
The port settings parameter must be an empty string.
Notes about using Bluetooth (Linux only)
Many Linux operating systems require administrator privileges to use Bluetooth devices.
If you are logged on as a user without administrator privileges, perform the following
conguration, to access a Star Bluetooth device.
1. Open the le 49-starusbprn.rules that is in the JavaPOS driver folder, and enter the user
name for the OWNER parameter.
2. Place this le in the /etc/udev/rules.d directory.
Note : 1) You may need administrator privileges to access the directory.
2) RHEL and CentOS do not support this method for using USB devices.
The value set here establishes a timeout period used to affect communications within this software.
If you do not specify this property, its default value (5000 ms) takes effect.
Adjust Communications Timeout Setting depending on your environment and amount of
printing data.
By setting this property to "True," you can check whether print data is sent properly to the printer.
If you do not specify this property, its default value (True) takes effect.
By setting this property to "True," you can use NV Logo printing by escape sequence (ESC|#B). If you do
not specify this property, its default value (False) takes effect.
You can set the Cash Draw Circuit you want to use. To use peripheral drive 1 for connecting the cash
drawer, set this property to "True". To use peripheral device 2, set this property to "False". The default value
is ”True”.
If your cash drawer supports status reporting, you may get the drawer open/closed status reports by setting
the option to 'True'. The default value is "False".
* This feature is only valid when the cash drawer that you are using supports an open-close detector switch.
Congure the status signal according to the specication of your cash drawer.
'True': Open/Close detection SW set to High when the cash drawer is open.
'False': Open/Close detection SW set to Low when the cash drawer is open.
The default value is "True".
- 12 -
Page 13
Star JavaPOS Driver Software Manual
5. Sample Program
The sample program is available in "StarReceiptTest.java", "StarSlipTest.java", "StarCashDrawerTest.java" and
"StarMICRTest.java".
Use them as references for developing your applications.
The following is the reference of “StarReceiptTest.java” for the print test.
1. Open the “StarReceiptTest.java”. Specify “location of jpos.xml” at “System.setProperty method". The
“location of jpos.xml” is “Full(Relative) Path + jpos.xml” or ”jpos.xml” (if jpos.xml and running application
are in the same package).
ex. Full Path :
<Windows>
”C:\Program Files\JavaPOS\bin\jpos.xml”
<Linux> <Mac>
”/usr/local/javapos/bin/jpos.xml”
<StarReceiptTest.java>
/*
* If you want to place the jpos.xml file elsewhere on your local file
* system then uncomment the following line and specify the full path to
* jpos.xml.
*
* If you want to place the jpos.xml file on a webserver for access over
* the internet then uncomment the second System.setProperty line below
* and specify the full URL to jpos.xml.
*/
System.setProperty( JposPropertiesConst.JPOS_POPULATOR_FILE_PROP_NAME, "jpos.xml");
“C:\Program Files\JavaPOS\bin\jpos.xml”,
”/usr/local/javapos/bin/jpos.xml”,
“../bin/jpos.xml”,
“jpos.xml”, etc...
2. Put the "logicalName" in "the jpos.xml" to the argument of "open method" in the "StarReceiptTest.java".
Also "logicalName" can put any name.
// open the printer object according to the entry names defined in jpos.xml
printer.open("POSPrinter_windows_usb_printer_class");
// claim exclusive usage of the printer object
printer.claim(1);
// enable the device for input and output
printer.setDeviceEnabled(true);
- 13 -
Page 14
Star JavaPOS Driver Software Manual
3. Save the StarReceiptTest.java. In Command Prompt(Terminal), run the following commands by
administrator authority for checking a "sample receipt printing".
*In this example, run the commands by administrator authority due to a place of directory.
i) Change to the directory of running application.
cd “Place of performing Java application”
ii) The "javac" command compiles a “java le” and create a “class le”.
*”jarFileN.jar” is ”Full(Relative) Path + jar le name” or ”jar le name”.
<Windows>
i)
ii)
iii)
- 14 -
Page 15
<Linux>
<Mac>
Star JavaPOS Driver Software Manual
i)
ii)
iii)
i)
ii)
iii)
* About a “-classpath” option of ”javac” or ”java” command.
At "-classpath", specify the required "jar les" to compile and run applications.
In addition to the above example, if there are in the same directory the "application executable le"
(.class) and "jar les", can specify only "jar le name"(not need le path).
ex. Particular place :
<Windows>
jar le, xml, java, gif - “C:\Program Files\JavaPOS”
* About commands for running, if files are in the same folder, refer to the beginning of the
StarReceiptTest.java.
- 16 -
Page 17
Star JavaPOS Driver Software Manual
6. Service Objects
The following tables list this driver's supporting status of JavaPOS service objects.
Please refer to the Java for Retail POS Programming Guide about the specifications of the Service Objects.
6.1 POS Printer
The Service Objects of POSPrinter is supported in StarPRNT Mode.
Valid only when this is performed at the beginning of a line
Can use NV Logo Print
(Refer to "4.2 POS Printer Connection Settings")
[#] can be set to the following values in unit of dots.
StarLine Thermal Printer : 1 - 127 dots
If any other value is set, ValidateData will return JPOS_E_ILLEGAL.
Model dependence
Model dependence
Up to 6 times
Up to 6 times
If PTR_RP_ROTATE180 is set, the alignment will be reversed.
If PTR_RP_ROTATE180 is set, the alignment will be reversed.
- 23 -
Page 24
6.2 Cash Drawer
The Service Objects of Cash Drawer is supported in StarPRNT Mode.
Properties
■
PropertySupporting statusRemarks
AutoDisable
CapCompareFirmwareVersion
CapPowerReporting
CapStatisticsReporting
CapUpdateFirmware
CapUpdateStatistics
CheckHealthText
Claimed
DataCount
DataEventEnabled
DeviceEnabled
FreezeEvents
OutputID
PowerNotify
PowerState
State
DeviceControlDescription
DeviceControlVersion
PhysicalDeviceServiceDescription
DeviceServiceVersion
PhysicalDeviceDescription
PhysicalDeviceName
CapStatus
CapStatusMultiDrawerDetect
DrawerOpened
○
○
○
○
○
○
○
-
○
○
○
○
○
○
○
○
○
○
○
○
○
○
"JavaPOS CashDrawer Device Control"
"Star Micronics JavaPOS CashDrawer Service Driver"
"Printer controlled cash drawer"
"Star Micronics Cash Drawer Controller"
FALSE
FALSE
FALSE
FALSE
1013000
1013010
FALSE
Star JavaPOS Driver Software Manual
Not applicable JavaPOS
StarPRNT : OS_PR_ADVANCED
Not applicable JavaPOS
Not applicable JavaPOS
Not applicable JavaPOS
Methods
■
MethodSupporting statusRemarks
Open
Close
ClaimDevice
Release
CheckHealth
ClearInput
ClearInputProperties
ClearOutput
CompareFirmwareVersion
DirectIO
ResetStatistics
RetrieveStatistics
UpdateFirmware
UpdateStatistics
OpenDrawer
WaitForDrawerClose
○
○
○
○
○
-
-
×
×
×
×
×
×
○
○
- 24 -
Not applicable JavaPOS
Not applicable JavaPOS
Not applicable JavaPOS
Page 25
Events
■
EventSupporting statusRemarks
DataEvent
DirectIOEvent
ErrorEvent
OutputCompleteEvent
StatusUpdateEvent
Star JavaPOS Driver Software Manual
×
-
○
Not applicable JavaPOS
Not applicable JavaPOS
Not applicable JavaPOS
- 25 -
Page 26
7. Version History
Rev. No.Date of RevisionChanges
Rev. 1.0Jun. 2018First edition.
Star JavaPOS Driver Software Manual
- 26 -
Page 27
URL: http://www.starmicronics.com/support/
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.