From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1391 invoked by alias); 1 Aug 2008 09:27:19 -0000 Received: (qmail 1381 invoked by uid 22791); 1 Aug 2008 09:27:19 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Aug 2008 09:27:01 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m719QxC7027603; Fri, 1 Aug 2008 05:26:59 -0400 Received: from zebedee.pink (vpn-12-162.rdu.redhat.com [10.11.12.162]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m719Quhs010250; Fri, 1 Aug 2008 05:26:57 -0400 Message-ID: <4892D6D6.3040908@redhat.com> Date: Fri, 01 Aug 2008 09:27:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.16 (X11/20080707) MIME-Version: 1.0 To: Ciamak Abkai CC: java@gcc.gnu.org Subject: Re: GCJ compiles fine, but I get cast exception References: <4892D35C.2000800@rumms.uni-mannheim.de> In-Reply-To: <4892D35C.2000800@rumms.uni-mannheim.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00001.txt.bz2 Ciamak Abkai wrote: > I try to run prefuse applying gcj. There is a problem with the > following cast : > > Graphics2D g2D = (Graphics2D)g; > > Exception during event dispatch: > Exception in thread "prefuse_ActivityManager" > java.lang.ClassCastException: gnu.java.awt.peer.gtk.GdkGraphics cannot > be cast to java.awt.Graphics2D at > prefuse.Display.paintComponent(Display.java:795) > > > > Do you have an idea how to solve the Problem ? GdkGraphics doesn't extend Graphics2D. Do you have any reason to believe that it should? It extends Graphics. Andrew.