[Debian-med-packaging] Problems to find classes that should be in itext1.jar

Emmanuel Bourg ebourg at apache.org
Sun May 22 20:18:58 UTC 2016


Le 22/05/2016 à 21:43, Andreas Tille a écrit :

> CLASSPATH=/usr/share/java/commons-httpclient.jar:/usr/share/java/commons-lang.jar:/usr/share/java/itext1-1.4.jar jh_build --javacopts='-target 1.7' --javacopts='-source 1.7' mesquite.jar Source LibrarySource
> find Source LibrarySource -name *.java -and -type f -print0 | xargs -s 512000 -0 /usr/lib/jvm/default-java/bin/javac -g -cp /usr/share/java/commons-httpclient.jar:/usr/share/java/commons-lang.jar:/usr/share/java/itext1-1.4.jar:debian/_jh_build.mesquite -d debian/_jh_build.mesquite -target 1.7 -source 1.7
> warning: [options] bootstrap class path not set in conjunction with -source 1.7
> LibrarySource/com/lowagie/text/Rectangle.java:53: error: package headless.awt does not exist
> import headless.awt.Color;
>                    ^
> LibrarySource/com/lowagie/text/pdf/PdfWriter.java:53: error: package headless.awt does not exist
> import headless.awt.Color;
>                    ^

iText doesn't contain any headless.awt.* class. It looks like the iText
code was copied and modified the turn the 'import java.awt.*' statements
into 'import headless.awt.*'. I guess as some point they copied and
relocated the java.awt classes to disable the exceptions on systems
without a display. Since Java 1.4 this can be avoided by setting the
java.awt.headless property to true.

I think you have two options:
1. remove the iText source files from the LibrarySource directory and
use the libitext1-java package instead
2. if it doesn't work because the itext code was further modified, patch
it and replace 'headless.awt' with 'java.awt'

Emmanuel Bourg




More information about the Debian-med-packaging mailing list