Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 72813 invoked from network); 27 Jun 2007 12:39:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jun 2007 12:39:49 -0000 Received: (qmail 88589 invoked by uid 500); 27 Jun 2007 12:39:52 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 88572 invoked by uid 500); 27 Jun 2007 12:39:52 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 88550 invoked by uid 99); 27 Jun 2007 12:39:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2007 05:39:52 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2007 05:39:48 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A37DF7141DC for ; Wed, 27 Jun 2007 05:39:27 -0700 (PDT) Message-ID: <20269074.1182947967667.JavaMail.jira@brutus> Date: Wed, 27 Jun 2007 05:39:27 -0700 (PDT) From: "Sergey Dmitriev (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-3719) Graphics.getFontMetrics() throws HeadlessExcetion if headless In-Reply-To: <3448625.1177258395419.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508523 ] Sergey Dmitriev commented on HARMONY-3719: ------------------------------------------ Ok, thanks for the info. Here is what I have: ] boy@room ~ ] ~/jre/bin/java -version Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. java version "1.5.0" pre-alpha : not complete or compatible svn = r550333, (Jun 27 2007), Linux/ia32/gcc 3.3.3, release build http://harmony.apache.org ] boy@room ~ ] ls -la ~/jre/lib/fonts/ total 644 drwxrwxrwx 2 boy boys 4096 2007-06-27 16:32 . drwxrwxrwx 6 boy boys 4096 2007-06-27 16:31 .. -rw-r--r-- 1 boy boys 29887 2007-06-27 16:32 cour.afm -rw-r--r-- 1 boy boys 29815 2007-06-27 16:32 courb.afm -rw-r--r-- 1 boy boys 29979 2007-06-27 16:32 courbi.afm -rw-r--r-- 1 boy boys 125201 2007-06-27 16:32 courbi.pfa -rw-r--r-- 1 boy boys 126868 2007-06-27 16:32 courb.pfa -rw-r--r-- 1 boy boys 30032 2007-06-27 16:32 couri.afm -rw-r--r-- 1 boy boys 122124 2007-06-27 16:32 couri.pfa -rw-r--r-- 1 boy boys 126064 2007-06-27 16:32 cour.pfa ] boy@room ~ ] ~/jre/bin/java -Djava.awt.headless=true getfontmetrics Uncaught exception in main: java.awt.HeadlessException at java.awt.HeadlessToolkit.getGraphicsFactory(HeadlessToolkit.java:171) at java.awt.ToolkitImpl.getFontMetrics(ToolkitImpl.java:135) at org.apache.harmony.awt.gl.CommonGraphics2D.getFontMetrics(CommonGraphics2D.java:833) at java.awt.Graphics.getFontMetrics(Graphics.java:151) at getfontmetrics.main(getfontmetrics.java:8) ] boy@room ~ ] > Graphics.getFontMetrics() throws HeadlessExcetion if headless > ------------------------------------------------------------- > > Key: HARMONY-3719 > URL: https://issues.apache.org/jira/browse/HARMONY-3719 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: Linux > Reporter: Sergey Dmitriev > > java.awt.Graphics.getFontMetrics() throws HeadlessException in headless mode. > ] bob@moon ~ > ] cat getfontmetrics.java > import java.awt.*; > import java.awt.image.*; > > public class getfontmetrics { > public static void main(String args[]) throws Exception { > BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB); > Graphics g = image.getGraphics(); > FontMetrics fm = g.getFontMetrics(); > System.out.println("font metrics: " + fm); > } > } > > ] bob@moon ~ > ] java -showversion -Djava.awt.headless=true getfontmetrics > java version "1.5.0" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) > BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-linux-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) > > font metrics: sun.font.FontDesignMetrics[font=java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12]ascent=12, descent=3, height=15] > > ] bob@moon ~ > ] ~/jre/bin/java -showversion -Djava.awt.headless=true getfontmetrics > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r531171, (Apr 22 2007), Linux/ia32/gcc 3.3.3, release build > http://incubator.apache.org/harmony > Uncaught exception in main: > java.awt.HeadlessException > at java.awt.HeadlessToolkit.getGraphicsFactory(Unknown Source) > at java.awt.ToolkitImpl.getFontMetrics(Unknown Source) > at org.apache.harmony.awt.gl.CommonGraphics2D.getFontMetrics(Unknown Source) > at java.awt.Graphics.getFontMetrics(Unknown Source) > at getfontmetrics.main(getfontmetrics.java) > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.