User Tools

Site Tools


at:tutorial:symbiosis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
at:tutorial:symbiosis [2007/03/31 13:37] – created tvcutsemat:tutorial:symbiosis [2007/04/06 15:44] jdedecker
Line 1: Line 1:
-====== Symbiosis with Java ====== 
- 
 <note>This Tutorial is still under heavy construction</note> <note>This Tutorial is still under heavy construction</note>
  
-AmbientTalk is fully implemented in Java and runs on top of the JVM.  Java provides an extensive class library that can be accessed from within AmbientTalk and objects created in AmbientTalk can be accessed from within Java.  As such the expressive power of AmbientTalk can be combined with the extensive library support of Java.+====== Symbiosis with Java ======
  
-This chapter explains how this symbiosis between Java and AmbientTalk can be accessed.  Hencethis chapter will explain:+AmbientTalk is fully implemented in Java and runs on top of the JVM.  Java provides an extensive class library that can be accessed from within AmbientTalk.  In other wordsJava classes can be instantiated and messages can be sent to Java objects from within AmbientTalk.
  
-  * How to access Java classes and objects from within AmbientTalk  +The reverse, namely that AmbientTalk objects can accessed from within Java is also possible.  AmbientTalk objects are reified at the Java level such that the Java language can be used to send messages and create new objects. 
-  * How to access AmbientTalk objects from within Java+ 
 +This chapter explains how both sides of this symbiotic relationship between Java and AmbientTalk can be leveraged. The goal of this symbiotic relationship is to complement the advantages of both languages and to alleviate their disadvantages.  For example, AmbientTalk can use the extensive class library from Java and Java can benefit from AmbientTalk's superior concurrency abstractions.
  
 ===== Accessing Java classes ===== ===== Accessing Java classes =====
 +The complete set of classes that are available in the class path of a running JVM are accessible from AmbientTalk through the jlobby object.  For example, referencing the Java Vector class from within AmbientTalk can be accessed with:
 +
 +<code>
 +>def Vector := jlobby.java.util.Vector
 +>><java:class java.util.Vector>
 +</code>
  
 ===== Creating Java objects ===== ===== Creating Java objects =====
at/tutorial/symbiosis.txt · Last modified: 2013/05/17 20:25 by tvcutsem