File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Interface and getClass() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Interface and getClass()" Watch "Interface and getClass()" New topic
Author

Interface and getClass()

Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

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

Joined: Oct 05, 2001
Posts: 1170

Ignore this. Its a JBuilder 6 issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interface and getClass()
 
Similar Threads
cast
Overriding rules... Please confirm!
package
Method Overloading Question
Explicit List implementation