Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interface and getClass()

 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For some reason calling getClass() on this object is throwing a NotFoundError. Any ideas why?

with -classic you get NoSuchMethodError without -classic you get nullPointerException.

java.lang.NoSuchMethodError: untitled3.myInterface: method getClass()Ljava/lang/Class; not found
at untitled3.B.test(B.java:19)
at untitled3.B.main(B.java:16)
Exception in thread "main"
java.lang.NullPointerException
at untitled3.B.test(B.java:19)
at untitled3.B.main(B.java:16)
Exception in thread "main"
Strange one.
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Classic VM (build 1.3.1-b24, native threads, nojit)
bombs on 1.4 as well, didnt test others.
using JBuilder6
I am at a loss.
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ignore this. Its a JBuilder 6 issue.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic