Java Code 39 Generator Data Encoding Tutorial

sample source code to input valid data and generate linear Code 39 images in Java


  • Easy encapsulation, integration and customization are supported with JavaBean conforming to a particular convention under a developmental environment
  • Class library contains all necessary class files for java barcode generation
  • Compatible with Headless Java, in which images can be generated without a graphic environment in JDK 1.4 and above
  • Generate and print Code 39 in JDK 1.4.0 and later version
  • Easy to Integrate Code 39 Generator other properties in your Java applications
  • Mature & Reliable Java Code 39 generation library with latest barcode symbology ISO Standards
  • Provide professional features to set inter-character space and wide narrow bar ratio for Code 39
  • Completely developed in Java for any operating systems with Java Virtual Machine
  • Encoding Code 39 valid data set to generate valid Code 39 images in Java applications
  • Set proper data length to generate and create valid Code 39 barcodes in Java applications

Java Code 39 data encoding focuses on details on how to encode Code 39 valid data set with valid data length in Java development, and other Code 39 tutorial guides are provided below:

Samples on how to set Code 39 size setting properties in Java can be found here;

Samples on how to set Code 39 image setting properties in Java projects can be fonud here.


Java Code 39 Basic Information

Java Code 39 is a Code 39 generation SDK for creating Code 39 images in Java projects which can draw Code 39 images with five image formats which are png, tiff, png, bmp and gif. Servlet, Applet, Java Bean and class library are supported in Java Code 39 generator.

Code 39 Overview

Code 39, also known as Alpha39, Code 3 of 9, Code 3/9, Type 39, USS Code 39, or USD-3, is an alpha-numeric barcode symbology, which is variable- length, discrete and widely-used.

Valid Data Set to Encode Code 39 in Java

  • Uppercase Letters: A - Z;
  • Numeric Digits: 0 - 9;
  • Special digits:- (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus);

Valid Data Length in Java

Java Code 39 is a linear barcode type for Java Barcode Generator which can only variable data length to generate high quality Code 39 images with Java applications.


Java Code 39 Data Encoding Details

Encode Only Numeric Data for Java Code 39

      Code39 barcode = new Code39();
barcode.setData("12341234");

Encode Only Uppercase Letters for Java Code 39

      Code39 barcode = new Code39();
barcode.setData("JAVA");

Encode Only Special Digits for Java Code 39

      Code39 barcode = new Code39();
barcode.setData(":/.+");

Encode Vriable Data Length for Java Code 39

Code 39 generation component in Java can encode varible data length for Code 39 image generation.

      Code39 barcode = new Code39();
barcode.setData("124578456455454");

Encode Code 39 Extension in Java

There is a figure in Code 39, representing the bar and space patterns, while Extended Code 39 focuses on the more specific information by displaying all 128 ASCII characters with Code 39.In other words, Code 39 Extension can encode lowercase letters excluding Code 39 valid data.Code 39 Extension property is false in default value.

      Code39 barcode = new Code39();
barcode.setData("Code39-for-Java");
barcode.setExtension(true);




OnBarcode is a market-leading provider of barcode generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides high quality tutorials and guides for various linear, 2d barcode information, such as C# Barcode, QR Code C#, QR Code VB.NET, QR Code ASP.NET, QR Code .NET, ASP.NET Barcode. OnBarcode barcode products are supported by RasterEdge .NET HTML5 Document Viewer high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.