This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ compiles fine, but I get cast exception
- From: Andrew Haley <aph at redhat dot com>
- To: Ciamak Abkai <cabkai at rumms dot uni-mannheim dot de>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 01 Aug 2008 10:26:46 +0100
- Subject: Re: GCJ compiles fine, but I get cast exception
- References: <4892D35C.2000800@rumms.uni-mannheim.de>
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.