Troubleshooting
Problem
Displaying barcodes properly in JasperReports PDF using BEA JRockit Java
Symptom
There is an issue displaying barcodes properly with JasperReports when using a non-Sun version of Java. The iText library we use for generating PDF depends on the strict floating point rules of Java 1.1 as implemented by the Sun Java Virtual Machine (JVM). As a general rule, Sun specifies that floating-point values of type float and double may only range over the float value set and double value set, respectively. In particular, class and instance fields, array elements, local variables, and method parameters may only contain values drawn from the standard value sets.
Cause
Resolving The Problem
If you are using BEA JRockit Java, start the JVM with the option '-Xstrictfp'
to restore the default behavior that is inherent with Sun.
Note:
Verified with JasperReports v1.0.x and BEA JRockit Java v1.4.2_05.
On a
UNIX box, the DISPLAY environment variable should also be set to point to your
physical X server (e.g. DISPLAY=:0.0). Alternatively, it is possible to use
Xvfb, an X server that can run on machines with no display hardware and no
physical input devices. It emulates a dumb frame buffer using virtual
memory.
References:
1. Case 35651 "Barcode Display in Jasper Report
PDF"
2. JasperSoft (http://www.jaspersoft.com/) (Community Forums in
particular)
Historical Number
PRI49703
Product Synonym
[<p><b>]Fact[</b><p>];
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21521779