You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Christian Geisert <Ch...@isu-gmbh.de> on 2000/08/18 10:27:19 UTC

Compiling FOP with JDK 1.1 (not)

Hi,

after getting the source from CVS I tried to compile it with JDK1.1.8
(the web-page says you need Java 1.1.x or later) but I got a lot of errors
(ant stoped after 100)

The problem is that some classes are using stuff from jdk1.2 like:

-PrintCommandLine imports java.awt.print.*
-AWTRenderer.java imports java.awt.geom.* 
-ImageReaderFactory.java imports java.util.Iterator

I think the easiest thing would be to say that you need JDK1.2 for
compiling which is no problem for me.

What about running AWT-Previewer and using Images?


Christian

Re: Compiling FOP with JDK 1.1 (not)

Posted by Christian Geisert <Ch...@isu-gmbh.de>.
Eric SCHAEFFER wrote:
> 
..
> What is the equivalent of java.util.Iterator for JDK 1.1.8 ?
> If that's the only JDK1.2 stuff used in the image package, no problem to
> change it...

I've just had a look at the code, ArrayList is used which also JDK1.2, but it
is not be that hard to change it (if FOP should run with JDK1.1)

> But maybe we should say we need Java2... (Is there so much OS that doesn't
> support Java2 ?)

What about Mac and *BSD ?
hey even AS/400 supports JDK1.2 ;-)

Christian

Re: Compiling FOP with JDK 1.1 (not)

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
----- Original Message -----
From: "Christian Geisert" <Ch...@isu-gmbh.de>
To: "FOP-DEV" <fo...@xml.apache.org>
Sent: Friday, August 18, 2000 10:27 AM
Subject: Compiling FOP with JDK 1.1 (not)


> Hi,
>
> after getting the source from CVS I tried to compile it with JDK1.1.8
> (the web-page says you need Java 1.1.x or later) but I got a lot of errors
> (ant stoped after 100)
>
> The problem is that some classes are using stuff from jdk1.2 like:
>
> -PrintCommandLine imports java.awt.print.*
> -AWTRenderer.java imports java.awt.geom.*
> -ImageReaderFactory.java imports java.util.Iterator
>
> I think the easiest thing would be to say that you need JDK1.2 for
> compiling which is no problem for me.
>
> What about running AWT-Previewer and using Images?
>

What is the equivalent of java.util.Iterator for JDK 1.1.8 ?
If that's the only JDK1.2 stuff used in the image package, no problem to
change it...

But maybe we should say we need Java2... (Is there so much OS that doesn't
support Java2 ?)

Eric.

>
> Christian
>


Re: Compiling FOP with JDK 1.1 (not)

Posted by Christian Geisert <Ch...@isu-gmbh.de>.
Arved Sandstrom wrote:
> 
..
> Anyhow, your summary changes the complexion and purpose of a FOP-0_14_1
> release. It almost seems as though we need to have a stripped-down binary
> with no printing and no AWT for the JDK 1.1.x folks (MacOS at the moment).
> 
> Any thoughts?

What about using the excludes-property in the javac-task from ant like the
following:

<target name="compile11" depends="codegen, prepare-src">
  <echo message="Compiling the sources (only JDK1.1 stuff)"/>
  <!-- create directories -->
  <mkdir dir="${build.dest}"/>

  <javac srcdir="${build.src}"
         destdir="${build.dest}"
         debug="${debug}"
         deprecation="${deprecation}"
         optimize="${optimize}"
         excludes="**/${ignore_this},${jimi}
                   ,org/apache/fop/render/awt/**
                   ,org/apache/fop/viewer/**
                   ,**/PrintCommandLine.java
                   ,**/AWTCommandLine.java"/>
</target>

Of course the JDK1.2-depending stuff should be declared in a property and
the best thing would be to check the JDK with ANT,
but i'm no ANT-expert (who is?)

building FOP with the above mentioned i got the following errors:

compile11:
Compiling the sources (only JDK1.1 stuff)
    [javac] Compiling 6 source files to D:\tmp\oss\xml-fop\build\classes
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\image\analyser\ImageReaderFactory.java:47:
Class java.util.Iterator not found in import.
    [javac] import java.util.Iterator;
    [javac]        ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\image\analyser\ImageReaderFactory.java:48:
Class java.util.ArrayList not found in import.
    [javac] import java.util.ArrayList;
    [javac]        ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\fo\pagination\PageSequenceMaster.java:112:
Method add(org.apache.fop.fo.pagination.SubSequenceSpecifier) not found in class
java.util.Vector.
    [javac] 		subSequenceSpecifiers.add( pageMasterReference );
    [javac] 		                         ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\fo\pagination\PageSequenceMaster.java:117:
Method remove(int) not found in class java.util.Vector.
    [javac] 		currentPmr = (SubSequenceSpecifier)subSequenceSpecifiers.remove( 0
);
    [javac] 		                                                               ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\fo\pagination\RepeatablePageMasterAlternatives.java:132:
Method get(int) not found in class java.util.Vector.
    [javac] 			(ConditionalPageMasterReference)conditionalPageMasterRefs.get(i);
    [javac] 			                                                             ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\image\GifJpegImage.java:187: Method
hasAlpha() not found in class java.awt.image.ColorModel.
    [javac]       if (cm.hasAlpha()) {
    [javac]                      ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\image\GifJpegImage.java:189: Method
getTransparency() not found in class java.awt.image.ColorModel.
    [javac]         int transparencyType = cm.getTransparency(); //
java.awt.Transparency. BITMASK or OPAQUE or TRANSLUCENT
    [javac]                                                  ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\image\GifJpegImage.java:191:
Undefined variable, class, or package name: java
    [javac]         if (transparencyType == java.awt.Transparency.OPAQUE) {
    [javac]                                 ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\image\GifJpegImage.java:197:
Undefined variable, class, or package name: java
    [javac]           java.awt.Transparency.BITMASK) {
    [javac]           ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\pdf\PDFBinaryStream.java:253: Method
add(org.apache.fop.pdf.PDFFilter) not found in class java.util.Vector.
    [javac] 		this.m_filters.add(filter);
    [javac] 		                  ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\pdf\PDFBinaryStream.java:275: Method
get(int) not found in class java.util.Vector.
    [javac] 			PDFFilter filter = (PDFFilter) this.m_filters.get(i - 1);
    [javac] 			                                                 ^
    [javac]
D:\tmp\oss\xml-fop\build\src\org\apache\fop\pdf\PDFBinaryStream.java:327: Method
get(int) not found in class java.util.Vector.
    [javac] 				PDFFilter filter = (PDFFilter) this.m_filters.get(i - 1);
    [javac] 				                                                 ^
    [javac] D:\tmp\oss\xml-fop\build\src\org\apache\fop\svg\A.java:139:
Incompatible type for method. Explicit cast needed to convert
org.apache.fop.dom.svg.GraphicImpl to org.apache.fop.svg.Graphic.
    [javac] 			((SVGArea) area).addGraphic(createGraphic());
    [javac] 			                                         ^
    [javac] .\build\src\org\apache\fop\fo\flow\Flow.java:67: Class
org.apache.fop.fo.flow.Flow. Maker already defined in
.\build\src\org\apache\fop\fo\flow\Flow.java.
    [javac]     public static class Maker extends FObj.Maker {
    [javac]                         ^
    [javac] .\build\src\org\apache\fop\fo\pagination\PageSequence.java:74: Class
org.apache.fop.fo.pagination.PageSequence. Maker already defined in
.\build\src\org\apache\fop\fo\pagination\PageSequence.java.
    [javac]     public static class Maker extends FObj.Maker
    [javac]                         ^
    [javac] 15 errors

BUILD FAILED

So a lot of errors have to do with the new collection-stuff in jdk1.2 ...


Christian

Re: Compiling FOP with JDK 1.1 (not)

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
At 10:27 AM 8/18/00 +0200, Christian Geisert wrote:
>Hi,
>
>after getting the source from CVS I tried to compile it with JDK1.1.8
>(the web-page says you need Java 1.1.x or later) but I got a lot of errors
>(ant stoped after 100)
>
>The problem is that some classes are using stuff from jdk1.2 like:
>
>-PrintCommandLine imports java.awt.print.*
>-AWTRenderer.java imports java.awt.geom.* 
>-ImageReaderFactory.java imports java.util.Iterator
>
>I think the easiest thing would be to say that you need JDK1.2 for
>compiling which is no problem for me.
>
>What about running AWT-Previewer and using Images?

I've been looking at this. Right now I'm having some problems getting a 
decent JDK 1.1.8 from Blackdown (their .bz file, least when I downloaded it, 
appears not to actually be a BZIP). Come to think of it, that could've been 
a MIME thing when I downloaded it. I'll try again today.

Anyhow, your summary changes the complexion and purpose of a FOP-0_14_1 
release. It almost seems as though we need to have a stripped-down binary 
with no printing and no AWT for the JDK 1.1.x folks (MacOS at the moment).

Any thoughts?

Arved

Senior Developer
e-plicity.com (www.e-plicity.com)
Halifax, Nova Scotia
"B2B Wireless in Canada's Ocean Playground"