harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Dmitriev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5828) [classlib][awt] Toolkit.getDefaultToolkit() throws NPE if DISPLAY is not set
Date Thu, 15 May 2008 17:47:55 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597208#action_12597208
] 

Sergey Dmitriev commented on HARMONY-5828:
------------------------------------------

> This causes SPECjvm2008 failure on reporting phase. 

Of course I was meaning the certain conditions - unset $DISPLAY. If your machine is headless
-Djava.awt.headless=true could be a workaround.

> [classlib][awt] Toolkit.getDefaultToolkit() throws NPE if DISPLAY is not set
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-5828
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5828
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: linux
>            Reporter: Sergey Dmitriev
>
> In case of absence of $DISPLAY Harmony's Toolkit.getDefaultToolkit() throws NPE. This
causes SPECjvm2008 failure on reporting phase.
> [someone@moon:~/tmp] echo $DISPLAY
> [someone@moon:~/tmp] cat gettk.java 
> import java.awt.*;
>  
> public class gettk {
>     public static void main(String args[]) throws Exception {
>         System.out.println("tk = " + Toolkit.getDefaultToolkit());
>     }
> }
>  
> [someone@moon:~/tmp] /export/Builds/jdk1.6.0-linuxIA32/bin/java -showversion gettk 
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)
>  
> tk = sun.awt.HeadlessToolkit@b66cc
> [someone@moon:~/tmp] /export/Builds/someone.harmony.lnx.ia32-r656720/bin/java -showversion
gettk
> Apache Harmony Launcher : (c) Copyright 1991, 2008 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r656720, (May 15 2008), Linux/ia32/gcc 3.4.2, release build
> http://harmony.apache.org
> Uncaught exception in AWT-NativeEventThread:
> Uncaught exception in main:
> Uncaught exception in AWT-EventDispatchThread:
> java.lang.NullPointerException
>         at java.awt.Toolkit.init(Toolkit.java:566)
>         at java.awt.Toolkit.<init>(Toolkit.java:540)
>         at java.awt.ToolkitImpl.<init>(ToolkitImpl.java:40)
>         at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:472)
>         at gettk.main(gettk.java:5)
> java.lang.NullPointerException
>         at java.awt.Toolkit.getNativeEventQueue(Toolkit.java:1184)
>         at java.awt.EventDispatchThread.run(EventDispatchThread.java:45)
> java.lang.InternalError: awt.0F
>         at org.apache.harmony.awt.wtk.linux.XServerConnection.<init>(XServerConnection.java:42)
>         at org.apache.harmony.awt.wtk.linux.XServerConnection.<clinit>(XServerConnection.java:34)
>         at org.apache.harmony.awt.wtk.linux.LinuxWindowFactory.<init>(LinuxWindowFactory.java:46)
>         at org.apache.harmony.awt.wtk.linux.LinuxWTK.<init>(LinuxWTK.java:100)
>         at java.lang.reflect.VMReflection.newClassInstance(VMReflection.java)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:283)
>         at java.lang.Class.newInstance(Class.java:702)
>         at java.awt.Toolkit.createWTK(Toolkit.java:987)
>         at java.awt.Toolkit.access$1(Toolkit.java:984)
>         at java.awt.Toolkit$1.init(Toolkit.java:556)
>         at org.apache.harmony.awt.wtk.NativeEventThread.run(NativeEventThread.java:47)
> [someone@moon:~/tmp] uname -a
> Linux moon 2.6.5-7.97-smp #1 SMP Fri Jan 26 15:37:27 MSK 2008 i686 i686 i386 GNU/Linux
> [someone@moon:~/tmp]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message