at:tutorial:symbiosis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
at:tutorial:symbiosis [2008/10/22 18:35] – * tvcutsem | at:tutorial:symbiosis [2013/05/17 20:25] (current) – updated tvcutsem | ||
---|---|---|---|
Line 51: | Line 51: | ||
A class is represented as a normal AmbientTalk object. All '' | A class is represented as a normal AmbientTalk object. All '' | ||
+ | |||
+ | < | ||
+ | If you want to load your own Java class make sure that the .class file is in the classpath of the JVM running AmbientTalk. By default, the iat script adds the standard $CLASSPATH classpath. | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Please do not name your own Java packages starting with a capital letter. Otherwise, AmbientTalk will confuse the package with a Java class. | ||
+ | </ | ||
==== Creating Java objects ==== | ==== Creating Java objects ==== | ||
Line 77: | Line 85: | ||
>>nil | >>nil | ||
>aVector | >aVector | ||
- | >>< | + | >>< |
</ | </ | ||
Line 171: | Line 179: | ||
>>42 | >>42 | ||
</ | </ | ||
+ | |||
==== Starting an AmbientTalk interpreter from Java ==== | ==== Starting an AmbientTalk interpreter from Java ==== | ||
Line 176: | Line 185: | ||
So far, the examples have illustrated how to reuse Java code from within AmbientTalk. They have shown how to access Java classes, instantiate them and invoke methods on the resulting objects. Moreover, | So far, the examples have illustrated how to reuse Java code from within AmbientTalk. They have shown how to access Java classes, instantiate them and invoke methods on the resulting objects. Moreover, | ||
- | Embedding AmbientTalk in an application, | + | Embedding AmbientTalk in an application, |
+ | |||
+ | Once an instance of an EmbeddableAmbientTalk subclass is created, the AmbientTalk VM can be started by sending it the '' | ||
< | < | ||
- | EmbeddedAmbientTalk | + | EmbeddableAmbientTalk |
vm.initialize( | vm.initialize( | ||
NATParser.parse( | NATParser.parse( | ||
Line 192: | Line 203: | ||
The code excerpt also illustrates that the EmbeddableAmbientTalk class provides methods to create definitions for fields such as '' | The code excerpt also illustrates that the EmbeddableAmbientTalk class provides methods to create definitions for fields such as '' | ||
- | Once the virtual machine is properly initialized, | + | Once the virtual machine is properly initialized, |
< | < | ||
Line 210: | Line 221: | ||
< | < | ||
- | When starting an AmbientTalk virtual machine from a Java application, | + | When starting an AmbientTalk virtual machine from a Java application, |
</ | </ |
at/tutorial/symbiosis.1224693304.txt.gz · Last modified: 2009/01/26 16:54 (external edit)