Abstract
We reveal a grey area in the specification of Java and of its implementation through the Java Virtual Machine (JVM): the treatment of initialization of classes and interfaces. We report the results of our experiments with different implementations of Java, which confirm the theoretical prediction of our work on mathematical models for Java [4] and the JVM [3], namely that the designers of Java and the JVM have used notions of initialization which do not match and which afflict the portability of Java programs. We also show that concurrent initialization may deadlock and that various current Java compilers violate the initialization semantics through standard optimization techniques.
Similar content being viewed by others
References
Alves-Foss, J. (ed): Formal Syntax and Semantics of Java(tm). Springer. LNCS 1523, 1999
Bertelsen, P.: Semantics of Java byte code. 1997 Ftp at: ftp://ftp.dina.kvl.dk/pub/Staff/Peter.Bertelsen/jvm-semantics.ps.gz
Börger, E., Schulte, W.: Defining the Java Virtual Machine as platform for provably correct Java compilation. In Brim, L., Gruska, J., Zlatuska, J. (eds). MFCS’98, Springer, LNCS 1450, 1998
Börger, E., Schulte, W.: A programmer friendly modular definition of the semantics of Java. In Alves-Foss [1], 1999
Cohen, R.M.: Defensive Java virtual machine version 0.5 alpha release, 1997. Web pages at: http://www.cli.com/software/djvm/
Gosling, J., Joy, B., Steele, G.: The Java(tm) Language Specification. Addison Wesley, 1996
Lindholm, T., Yellin, F.: The Java(tm) Virtual Machine Specification. Addison Wesley, 1996
Perera, R., Bertelsen, P.: Java spec report. 1998, Web pages at: http://www.dina.kvl.dk/~jsr/
Saraswat, V.: Java is not type-safe. 1997, Web pages at: http://www.research.att.com/~vj/main.html
Sirer, E.G., McDirmid, S., Bershad, B.: Kimera: A Java system security architecture. 1997, Web pages at: http://www.kimera.cs.washington.edu/.
Stata, R., Abadi, M.: A type system for Java bytecode subroutines. In Proceedings of the 25th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1998
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Börger, E., Schulte, W. Initialization problems for Java. Software - Concepts & Tools 19, 175–178 (2000). https://doi.org/10.1007/s003789900003
Published:
Issue Date:
DOI: https://doi.org/10.1007/s003789900003