Palm KVM question:
Can anyone explain to me why this line of code:
if (item instanceof Parental) ((Parental) item).setParent(this);
Chokes with this error message in the KVM:
Class format error: Illegal CONSTANT_Class reference
What gives??? I know there is nothing wrong with the Java classes I'm
referencing (I've ported a simple example from something that works fine
under the JDK)...ideas? suggestions?
I'm not sure whether it doesn't like the "instanceof" operator, the class
cast, or the reference to "this".
Along these lines, I've been surprised at a number of things which are
missing in the KVM:
-java.lang.System doesn't exist
-java.lang.Integer doesn't exist
-java.lang.Runtime.exit has different signature under KVM than under JDK
-java.util.* doesn't exist
-no long data types
-there is no way to create a Date (ar get any timestamp that I can see)
-java.lang.Class doesn't have an isInstance(Class) method
I'm beginning to suspect that there are lots of other things missing as
well.
The Micro Edition White Paper seems to indicate many of these should be
there...is this just a case of "gee, no wonder why its not even alpha
release yet" or should we expect that we will never see these things in the
KVM?
Can anyone speak to this??? I'm not asking for real specific details (yet),
but I'd like a general idea of direction. Right now its looking pretty
scary...
Christian
--------------------------------------------
Christian Cryder
Software Engineer - UHR Infrastructure
REALM Information Technologies - http://www.realminfo.com
Adventures in UHR - http://realm.granitepeaks.com
Plugin Version Control for Java (PVCj 1.0) - http://www.pssg.com/pvcj
--------------------------------------------
"What a great time to be a geek"
--------------------------------------------