Brendan Lane Larson wrote:
Thomas and Vincent,
Good to meet both of you at SVG Open in Vancouver last week. As I noted
a few days ago at the conference, the 1.5 Batik release fails on Mac OS
X 10.2.6 when I attempt to run Squiggle to view SVG documents (the
previous version of 1.5 beta worked fine). The version of Apple's JDK
that I have installed on my Mac is as follows:
This has all the appearence of a JDK issue. Can you tell me if the
attached sample Java test file fails?
You should be able to run it with:
% javac -g Test.java
% java -cp . Test
java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)
When I run squiggle, as it is loading its various resources during
start-up, I receive an error message in a panel that states, "SVG
Error: null" with Show Details stating:
java.lang.Exception
at
org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:114)
Per Thomas' suggestion after the Batik Panel discussion at SVG Open, I
compiled the source of Batik release 1.5 in the xml-batik directory
with the debug=on switch set in the build.properties document that I
created, and then I ran './build.sh squiggle' with the following output
(see below) which I hope if useful. Please let me know if I can be of
further assistance with respect to Batik and Mac OS X 10.2.x.
Cheers,
-Brendan Lane Larson
./build.sh squiggle
Buildfile: build.xml
init-args:
init:
compile:
Created dir: /Users/xyz/Batik.v1.5/xml-batik/classes
debug on, optimize on, deprecation on
/Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/
svgbrowser/Main.java:812: warning: encode(java.lang.String) in
java.net.URLEncoder has been deprecated
lastVisitedBuffer.append(URLEncoder.encode(lastVisited.elementAt(i).toS
tring()));
^
/Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/
svgbrowser/Main.java:858: warning: decode(java.lang.String) in
java.net.URLDecoder has been deprecated
lastVisited.addElement(URLDecoder.decode(st.nextToken()));
^
2 warnings
squiggle:
2003-07-20 13:51:00.120 java[4629] Font GB18030Bitmap: in
_readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
2003-07-20 13:51:02.440 java[4629] Warning: Font
LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
2003-07-20 13:51:04.112 java[4629] Warning: Font
LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
java.lang.ExceptionInInitializerError
at
org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIForF
ontMatching(StrokingTextPainter.java:439)
at
org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(StrokingT
extPainter.java:196)
at
org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline(StrokingTe
xtPainter.java:1029)
at
org.apache.batik.gvt.renderer.BasicTextPainter.getGeometryBounds(BasicT
extPainter.java:81)
at
org.apache.batik.gvt.TextNode.getGeometryBounds(TextNode.java:229)
at
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedGeometryBounds(
AbstractGraphicsNode.java:841)
at
org.apache.batik.gvt.CompositeGraphicsNode.getGeometryBounds(CompositeG
raphicsNode.java:231)
at
org.apache.batik.bridge.SVGUtilities.convertRegion(SVGUtilities.java:10
07)
at
org.apache.batik.bridge.SVGUtilities.convertFilterChainRegion(SVGUtilit
ies.java:612)
at
org.apache.batik.bridge.SVGFilterElementBridge.createFilter(SVGFilterEl
ementBridge.java:66)
at
org.apache.batik.bridge.CSSUtilities.convertFilter(CSSUtilities.java:66
1)
at
org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(Ab
stractGraphicsNodeBridge.java:118)
at
org.apache.batik.bridge.SVGUseElementBridge.buildGraphicsNode(SVGUseEle
mentBridge.java:317)
at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18
6)
at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18
4)
at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
at
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(
SVGUseElementBridge.java:167)
at
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseEl
ementBridge.java:76)
at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:17
8)
at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18
4)
at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
at
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(
SVGUseElementBridge.java:167)
at
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseEl
ementBridge.java:76)
at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:17
8)
at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:66)
at
org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:94)
Caused by: java.lang.NullPointerException
at
sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi
csEnvironment.java:327)
at
sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi
csEnvironment.java:359)
at
org.apache.batik.gvt.font.FontFamilyResolver.<clinit>(FontFamilyResolve
r.java:62)
... 31 more
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
/******************************************************************************
*
* Copyright 2003, Eastman Kodak Company, All rights reserved
*
*****************************************************************************/
import java.awt.*;
public class Test {
public static void main(String [] args) {
GraphicsEnvironment env;
env = GraphicsEnvironment.getLocalGraphicsEnvironment();
String fontNames[] = env.getAvailableFontFamilyNames();
int nFonts = fontNames != null ? fontNames.length : 0;
for(int i=0; i<nFonts; i++)
System.err.println("Font: " + fontNames[i]);
Font f = new Font("SansSerif", 0, 12);
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]