Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / May 2004

Tip: Looking for answers? Try searching our database.

Class file format

Thread view: 
javaprog - 27 May 2004 09:00 GMT
Hi,
I've got a version of the Waba VM that only supports class files
format 45.3 [Java 1.1] (and probably below).
I'd like to modify the source so that it supports more recent formats,
however I can't find any documentation that describes the differences
between the different formats.
Sun has some excellent documentation that describes the whole class
file format, but it doesn't seem to explain what the differences are
between the different format versions.
Has anyone got, or can point me to some documentation that describes
this?
Thanks a lot,

JP
Chris Uppal - 27 May 2004 10:35 GMT
> Sun has some excellent documentation that describes the whole class
> file format, but it doesn't seem to explain what the differences are
> between the different format versions.

There aren't any.  The only differences are the version numbers themselves.
Sun have introduced new "attributes" at various times, but none of the new ones
affect the runtime semantics.

I think there is a real change in 1.5 in that, as I understand it, the "ldc"
instruction is allowed to be refer to class name entries in the constant pool
in addition to Strings and numbers.  (A useful change, but it is /really/ worth
breaking backward compatibility for ??)

   -- chris
javaprog - 28 May 2004 09:55 GMT
> > Sun has some excellent documentation that describes the whole class
> > file format, but it doesn't seem to explain what the differences are
[quoted text clipped - 10 lines]
>
>     -- chris

Thanks.
Actually I've found what I was looking for. There seem to be some
subtle differences in the bytecode format a la:

--
As of J2SE 1.4.0, the javac bytecode compiler uses "-target 1.2" by
default as opposed to the previous "-target 1.1" behavior. See the
reference page for the javac compiler for descriptions of these
behaviors. One of the changes involved in targeting 1.2 is that the
compiler no longer generates and inserts method declarations into
class files when the class inherits unimplemented methods from
interfaces. These inserted methods, like all other non-private
methods, are included in the default serialVersionUID computation. As
a result, if you define an abstract serializable class which directly
implements an interface but does not implement one or more of its
methods, then its default serialVersionUID value will vary depending
on whether it is compiled with the J2SE 1.4 version of javac or a
previous javac.
--

and I guess that coupled with the slightly sketchy Waba VM, that's
enough to stop it working.
Andrew Thompson - 28 May 2004 10:34 GMT
>>> ...class file format

> Actually I've found what I was looking for. There seem to be some
> subtle differences in the bytecode format a la:

..glad to hear you got it sorted.  :-)

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.