Java Barcode Code 128 Generator Library
Create, generate, print Code 128 barcode with checksum image label in Java class using java barcode encoder with free Java example source code


How to generate, display, print barcode 128 with valid checksum, check digit in Java class, Apache web application. Free download



  • Compatible with JDK 1.5.0_22 and later versions
  • In accordance with ISO/IEC 15417 (Second edition 2007-06-01)
  • Easy to be applied into almost all operating systems, like Windows 7, XP, etc
  • Able to be tested in IntelliJ IDEA 5.0 and iReport 3.7.5
  • Create high quality Code 128 barcodes in Java class
  • Be able to generate Code 128 in iReport and Eclipse BIRT Java reporting software
  • Save Code 128 barcode images in four image formats (PNG, BMP, GIF and JPEG)
Code 128 Barcode Generator for Java Description
With KA.Barcode for Java barcode generator, users can create advanced Code 128 and many other 1D and 2D symbologies in Java class. Rich parameters of barcodes are provided for users to customize their barcodes.
Code 128 Barcode Overview in Java
Code 128 is a continuous linear barcode with variable data length and high density. It is self-checking and used extensively in many applications where a relatively large amount of data must be encoded in a relatively small amount of space.
Code 128 Encodable Character Set
  • Code 128 A (Code Set A): 0-9, A-Z, and special characters
  • Code 128 B (Code Set B): 0-9, A-Z, a-z, and special characters
  • Code 128 C (Code Set C): numeric digit pairs 00-99 and three special characters
Download Code 128 Barcode Generator for Java
KA.Barcode for Java barcode generator can be downloaded free of cost from our website. The following items are included in the unzipped package.
  • com.keepautomation.barcode.jar
  • "barcode" folder & "java-barcode-api" folder
  • End user license agreement, user manual, and order page
Tips: The free version of KA.Barcode for Java barcode generator can be used continuously. But you should pay attention that a "KA Barcode" watermark is contained in the generated barcode images randomly, so the trial version cannot be used for commercial applications.
Code 128 Introduction
Code 128 barcode, also known as ANSI/AIM 128, ANSI/AIM Code 128, USS Code 128, Uniform Symbology Specification Code 128, is a high-density linear barcode symbology, which encodes digits, text, control characters, and full ASCII 128 characters.

Barcode Generator Java library not only encodes Code 128 barcode in your Java apps, but also allows you to generate Code 39, create GS1-128, generate Data Matrix, create QR Code, print EAN-13, create UPC-A barcodes in your Java Windows and web applications.
Code 128 Character Set Encoding

Encoding characters
In Java class, you can generate Code 128 barcode with the following characters encoded
  • All 128 Full ASCII characters defined in ISO/IEC 646
  • Extended ASCII characters are also supported with Function Character (FNC4) used. (By default are values 128 - 255 of ISO/IEC 8859-1, Latin Alphabet 1)
  • 4 non-data function characters: FNC1, FNC2, FNC3, FNC4
  • 4 code set selection characters. They allow you to switch from one code set to another.
  • 3 Start characters
  • 1 Stop character

Code 128 Code sets (A, B, C)
Code 128 barcode has three unique data character code sets
  • Code Sets A
  • Code Sets B
  • Code Sets C
Each code set includes a subset of the full ASCII character set together with various auxiliary characters.

Using Code sets in Code 128, it will improve the characters encoding efficiency. Using Java Code 128 barcode generator library, you do not need switch code sets in your encoding data. Choose "Auto" data mode, the barcode library will automatically encode the Code 128 data using the best efficient code sets group.

Code 128 characters length
The Code 128 ISO specification does not specify the maximum number of characters in a single barcode image.

When you create Code 128 in your Java class, you need check your applied Code 128 application standards. Some Code 128 application may provide the limits on the maximum number of characters in Code 128. For example, GS1-128 has limited the maximum length of Code 128 data to 48 characters.

Code 128 special characters encoding in Java
Code 128 barcode supports the following special characters:
  • Code Set and shift characters
  • Function characters (FNC1, FNC2, FNC3, FNC4)
  • Start and stop characters
Using Java Code 128 barcode generator library, you do not need worry about learning how to encode above special characters in Code 128 in your Java class. The barcode generator software will automatically insert the right characters for you in the right position.

Code 128 symbol check digit encoding in Java
Code 128 barcode contains a mandatory check digit (check sum) character, which is based on module 103 (mod 103).

According to the Code 128 ISO specification, the Code 128 check digit will not be displayed in the barcode text (human readable interpretation) area, and will not be returned by the barcode scanner devices and barcode reader software or library.

Using the barcode generator java library, it will automatically calculate the Code 128 check digit based on the encoding data message, and append the check character to the end of the Code 128 data message in your Java class.
Code 128 Barcode Generation in Java Class

KA.Barcode for Java Installation
  1. Please download and unzip our KA.Barcode for Java barcode generator package.
  2. Copy "com.keepautomation.barcode.jar" file from the unzipped package to your Java project library folder.
  3. Locate "com.keepautomation.barcode.jar" to your project reference.
Code 128 Creation in Java Class with Sample Code
Below is the sample code for creating Code 128 barcodes in Java class. The properties of Code 128 can be adjusted easily. Now you can copy this code to your projects to create sample Code 128 barcodes.
Sample code
     public static void main(String[] args)
{

BarCode code128 = new BarCode();

code128.setCodeToEncode("123456789");
code128.setSymbology(IBarCode.CODE128);
code128.setX(2);
code128.setY(50);
code128.setRightMargin(0);
code128.setLeftMargin(0);
code128.setTopMargin(0);
code128.setBottomMargin(0);
code128.setChecksumEnabled(false);
code128.setFnc1(IBarCode.FNC1_NONE);

try
{

code128.draw("c://code128.gif");

}
catch (Exception e) {
e.printStackTrace();
}
}
}
Generate Code 128 in iReport Through JRRenderable Implementation
KA.Barcode for Java enables developers to insert Code 128 barcodes in iReport through JRRenderable implementation. If you want to see detailed information about how to create Code 128 barcodes in iReport through JRRenderable, please read the user manual in KA.Barcode for Java free trial package. Download KA.Barcode for Java free trial package now!
Create Code 128 in iReport Through Servlet Web Application
Developers can also use KA.Barcode for Java barcode generator to add Code 128 barcodes in iReport through Servlet Web Application. Detailed information about how to create Code 128 barcodes in iReport through servlet web application is described in the user manual of KA.Barcode for Java free trial package. Now download KA.Barcode for Java free trial package.
Free Trial DownloadJava Class Code 128iReport Code 128Data Matrix for JavaPDF417 for JavaQR Code for JavamoreCodabar for JavaCode 39 for JavaEAN-8 for JavaEAN-13 for JavaEAN 128 for JavaIntelligent Mail for JavaInterleaved 2 of 5 for JavaISBN for JavaITF-14 for JavaRM4SCC for JavaUPC-A for JavaUPC-E for Javamore
KeepAutomation provides complete barcode automation solutions. We recommend the customers use high quality document controls: ASP.NET Document Viewer, ASP.NET MVC Document Viewer, Document Viewer ASP.NET C#, ASP.NET PDF Viewer, ASP.NET Word Viewer, ASP.NET Excel Viewer, ASP.NET PDF Editor, MVC PDF Viewer, ASP.NET Annotate PDF, c# pdf sdk, C# View, edit PDF online , C# Convert PDF to Tiff, C# Convert PDF to text, txt, .net imaging sdk, C# PDF metadata edit from RasterEdge.com.