On the integration of Smalltalk and Java: practical experience with STX:LIBJAVA

  • Authors:
  • Marcel Hlopko;Jan Kurš;Jan Vraný;Claus Gittinger

  • Affiliations:
  • Czech Technical University in Prague;University of Bern;Czech Technical University in Prague;eXept Software AG

  • Venue:
  • Proceedings of the International Workshop on Smalltalk Technologies
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

After decades of development in programming languages and programming environments, Smalltalk is still one of few environments that provide advanced features and is still widely used in the industry. However, as Java became prevalent, the ability to call Java code from Smalltalk and vice versa becomes important. Traditional approaches to integrate the Java and Smalltalk languages are through low-level communication between separate Java and Smalltalk virtual machines. We are not aware of any attempt to execute and integrate the Java language directly in the Smalltalk environment. A direct integration allows for very tight and almost seamless integration of the languages and their objects within a single environment. Yet integration and language interoperability impose challenging issues related to method naming conventions, method overloading, exception handling and thread-locking mechanisms. In this paper we describe ways to overcome these challenges and to integrate Java into the Smalltalk environment. Using techniques described in this paper, the programmer can call Java code from Smalltalk using standard Smalltalk idioms while the semantics of each language remains preserved. We present STX:LIBJAVA --- an implementation of Java virtual machine within Smalltalk/X --- as a validation of our approach.