KA.Barcode for Java
Guide for Encoding Alphanumeric Data in Java Code 39
Complete Code 39 source code to generate, print EAN-13 images using Barcode Generator for Java Control
Code 39 Generator for Java Overview
  • Java Client applications (Java Class, Swing, Applet, Java Bean and J2SE) are supported
  • Easy to generate Code 39 images in Java Reports, such as Jasper Report, iReport, Eclipse BIRT and Oracle Reports
  • Supports Java Reports software to set your wanted size of Code 39
  • Generate and print Code 39 in JDK 1.4.0 and later version
  • 100% developed in Java for any operating systems with Java Virtual Machine.
  • Simple to change the height of Code 39 barcode image with setting the Y(height of bar module) or BarcodeHeight.
  • Numeric data, uppercase letters are valid for generating Code 39 with variable data length
  • Encode Code 39 valid data with valid data length to generate Code 39 images in Java
Code 39 for Java Valid Character Set
Code 39 is also named as 3 of 9 Barcode, ASNI/AIM Code 39, USD-3, USS Code 39, Code 3/9, Code 3 of 9, USD-3, Code 39 Extended. For Code 39 in Java, it can encode:
  • Numeric Characters: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Uppercase letters: from A to Z
  • Punctuations: -(Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)
For Extended Code 39 in Java, it can encode:
  • Numeric Characters: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Uppercase letters: from A to Z
  • Lowercase letters: a - z
  • Punctuations: -(Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)
Related Code 39 Java Generation Setting Guide
Excluding Java Code 39 Size Setting, Code 39 generator for Java provides other concerned Code 39 generation setting properties for adjust the image and size:
Valid Data in Variable length for Encoding Code 39
Java Code 39 generator is compatible with encoding all 128 ASCII characters with variable data length. The following just show you some special encoding data you may need to set.

Encode Lowercase letters only in Code 39 Java Generator

During generating Code 39 image, you need to encode lowercase letters, therefore, you need to construct the code of Extended Code 39 to be true to generate Code 39 image by encoding lowercase letters in Java programming.
  • 1. Install Java Code 39 generator and set up it;
  • 2. Call Code 39 type in the beginning of Java;
  • 3. Encode Code 39 data;

For example,

barcode barcode = new Barcode();

barcode.setType(IBarCode.CODE39);

barcode.setextension(ture);

barcode.setCode("java");

Display Start and Stop Characters in Code 39

You may need to show the asterisks character (*) which is only the start and stop symbol for linear barcode Code 39 in java and can be displayed or hidden with setting it.
  • Install Java Code 39 generator and set up it;
  • Call Code 39 type in the beginning of Java;
  • Encode Code 39 data;
  • Set the displayStartStopChar property.

For example,

barcode barcode = new Barcode();

barcode.setType(IBarCode.CODE39);

barcode.setCode("java");

barcode.setdisplayStartStopChar(true);