#629 NoClassDefFoundError when accessing public static final field with JavaFFI

Yelagin Mon 8 Jun 2009

running code

using [java]java.awt.geom::PathIterator
class Foo {
  static Void main() {
    echo(PathIterator.WIND_EVEN_ODD.toStr)
  }
}

results in

C:\work>fan test.fan
sys::Err: java.lang.NoClassDefFoundError: java/awt/geom/PathIterator$
test_0::Foo.main (/C:/work/test.fan:4)
sun.reflect.NativeMethodAccessorImpl.invoke0 (Unknown)
sun.reflect.NativeMethodAccessorImpl.invoke (Unknown)
sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown)
java.lang.reflect.Method.invoke (Unknown)
fan.sys.Method.invoke (Method.java:539)
fan.sys.Method$MethodFunc.callList (Method.java:185)
fan.sys.Method.callList (Method.java:147)
fanx.tools.Fan.callMain (Fan.java:136)
fanx.tools.Fan.executeFile (Fan.java:89)
fanx.tools.Fan.execute (Fan.java:35)
fanx.tools.Fan.run (Fan.java:229)
fanx.tools.Fan.main (Fan.java:267)

what's the problem?

brian Mon 8 Jun 2009

Promoted to ticket #629 and assigned to brian

That is a nasty bug. I will try to push a fix to hg as soon as possible.

brian Mon 8 Jun 2009

Ticket resolved in 1.0.44

The bug is accessing static finals on interfaces.

I pushed a fix to hg.

Login or Signup to reply.