|
|
Methods on Object lost through Interfaces |
| If you select for you target VM anything other that "All Java SDKs" and compile
a simple program such as the following
public class B implements XYZ{
B(){
test2(this);
}
public static void main(String [] vars){
new B();
}
void test2(XYZ interf){
Class c = interf.getClass(); //does not work
// Class c = ((Object)interf).getClass(); //does work
System.out.println("class is " + c);
}
}
interface XYZ{};
with -classic you will get NoSuchMethodError exceptions, and with other JVMs you
will get NullPointerExceptions trying to call methods defined in Object through
the interface reference.
This does not happen from the command prompt. JBuilder is not kind enough to
let us see its compile as it does its execution command either...
| |
| I believe this is another symptom of the bugs in the JB6 compiler caused by the new 'Target JVM' feature. Basically, avoid using this field, leave it set to the default value of 'All JVMs'.
The more common symptom of this problem is the infinite compile loop.
| |
| [Append to This Answer] | |
| 2002-Jun-08 8:42pm |
| Previous: |
|
| ||||||||
|
Java Community
Java Tools |
Code Central JB OpenTools |
Community Recent Threads |
Borland Chat Chat FAQ |
||||||||||||||
|
Feature Matrices 3.0 | 3.5 | 4.0 5.0 | 6.0 | 7.0 |
Shop for JBuilder |
JBuilder Downloads and reg keys |
Report Piracy | ||||||||||||||
|
Online Manuals 4.0 | 5.0 | 6.0 7.0 |
Borland DevSupport's Bug/RFE Form Quality Central Client |
JB Patches & Updates |
JBuilder FAQs TIs | ||||||||||||||
|
JBuilder Newsgroups |
Tamaracka's News Archive |
Mr. Haki's JBuilder Machine |
JGuru's JBuilder FAQ |
||||||||||||||
|
Sun's Bug Parade |
|||||||||||||||||
|
|||||||||||||||||