using a star micronics printer on linux ubuntu 9.04 with javapos

11
Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729 Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com Created September 2009 This application note shows how to use a Star Micronics on Ubuntu Linux 9.04 with the JavaPOS driver. While this was written using a USB TSP650, these directions suffice for the following supported models. Models Supported: HSP7000, TSP650, TSP700II, SP700 and TUP500. *Note: Please first refer to the Readme file for specific configuration for your printer model. 1. The Java development kit must be installed to use the JavaPOS driver. Click on System at the top menu bar, then Administration/Synaptic Package Manager. 2. Enter the password if prompted.

Upload: others

Post on 12-Sep-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

Created September 2009 This application note shows how to use a Star Micronics on Ubuntu Linux 9.04 with the JavaPOS driver. While this was written using a USB TSP650, these directions suffice for the following supported models. Models Supported: HSP7000, TSP650, TSP700II, SP700 and TUP500. *Note: Please first refer to the Readme file for specific configuration for your printer model.

1. The Java development kit must be installed to use the JavaPOS driver. Click on System at the top menu bar, then Administration/Synaptic Package Manager.

2. Enter the password if prompted.

Page 2: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

3. Search for sunjava6.jdk in the Quick search field.

4. When the package appears, right-click on it and click on Mark for Installation.

Page 3: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

5. Click the Mark button.

6. All other necessary packages will be selected automatically. Click Apply at the top.

Page 4: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

7. Click the Apply button.

The files will download.

Page 5: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

8. Agree to the license terms and click Forward.

9. Click the Close button.

Page 6: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

10. Open the Synaptic Package Manager again and ensure there is a green box next to sun-java6-jdk.

Downloading and Installing the Star Micronics JavaPOS Driver

1. Obtain the Star Micronics JavaPOS Package (starjavapos_linux_Ver1.9.13) at our website: www.starmicronics.com

2. Open the “starjavapos_linux_Ver1.9.13” folder. Right click on “jpos.xml” and click on Open with Text Editor.

Page 7: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

3a. Search for your printer model (ie: TSP654) and copy the Logical Name. USB and Parallel connections require no modification to this file; skip to step 4. If the printer has a Serial or Ethernet interface, skip to step 3b.

*Note: There currently is no support for USB printer class for HSP7000, TSP650, TSP700II and SP700. If you have a USB interface, you must select the vendor class logical name and put Dip switch 5 OFF on the printer.

3b. For a serial connection, enter the baud rate. For ethernet, enter the IP address. Serial:

Ethernet:

Page 8: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

4. Revisit the Star JavaPOS folder and locate the sample receipt file named “StarReceiptTest.java”. Right click and click Open with Text Editor.

5. Search for the printer.open statement.

Page 9: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

6. Paste the printer’s Logical Name into the “printer.open” section as shown below.

7. Scroll up to the top of the StarReceiptTest.java file to the “Usage instructions – Linux” section.

8. Open Terminal (Applications/Accessories/Terminal)

Change the directory to the starjavapos_linux_Ver1.9.13 folder. Type “cd” and then drag the name starjavapos_linux_Ver1.9.13 into Terminal.

Page 10: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

9. Refer back to the StarReceiptTest.java file and copy “javac –classpath jpos191-controls.jar:jcl.jar StarReceipt Test.java”.

Type “sudo” in Terminal, then paste the command line and hit enter. Enter the password if prompted.

Page 11: Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Using a Star Micronics Printer on Linux Ubuntu 9.04 with JavaPOS

Star Micronics America, Inc. 1150 King Georges Post Road, Edison, NJ 08837-3729

Tel: (732) 623-5500 Fax: (732) 623-5590 Web: www.starmicronics.com

10. Copy the second line “java –classpath .:starjavapos.jar:stario.jar:commandemulator.jar:jpos101-

controls.jar:jcl.jar:xercesimpl.jar-apis.jar StarReceiptTest” Type “sudo” in Terminal, then paste the command line and hit enter.

Terminal will confirm that the command was accepted and a Sample Test receipt will print out.

Congratulations! You have successfully printed using the Star Micronics JavaPOS driver.