13
C H A P T E R
Binary Compatibility
J
AVA development tools should support automatic recompilation as necessary
whenever source code is available. Particular implementations of Java may also
store the source and binary of types in a versioning database and implement a
ClassLoader
 ( 20.14) that uses integrity mechanisms of the database to prevent
linkage errors by providing binary compatible versions of types to clients.
Developers of packages and classes that are to be widely distributed face a
different set of problems. In the Internet, which is our favorite example of a
widely distributed system, it is often impractical or impossible to automatically
recompile the pre existing binaries that directly or indirectly depend on a type that
is to be changed. Instead, Java defines a set of changes that developers are permit 
ted to make to a package or to a class or interface type while preserving (not
breaking) compatibility with existing binaries.
The paper quoted above appears in
Proceedings of OOPSLA '95
, published as
ACM SIGPLAN Notices
, Volume 30, Number 10, October 1995, pages 426 438.
Within the framework of that paper, Java binaries are binary (release to release)
compatible under all relevant transformations that the authors identify. Using their
scheme, here is a list of some important binary compatible changes that Java sup 
ports:
Reimplementing existing methods, constructors, and initializers to improve
performance.
Changing methods or constructors to return values on inputs for which they
previously either threw exceptions that normally should not occur or failed by
going into an infinite loop or causing a deadlock.
Adding new fields, methods, or constructors to an existing class or interface.
Deleting
private
 fields, methods, or constructors of a class or interface.
When an entire package is updated, deleting default (package only) access
fields, methods, or constructors of classes and interfaces in the package.
Reordering the fields, methods, or constructors in an existing type declaration.
237






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved