On the Java side, users specify a set of Java types in which they are interested and a file name to the generateFor (filename, classNames) static method. The repository then produces and outputs a file containing the information required by SST, such as superclass, field names, file types, method specifications, class hash, and so on. This file is then loaded into Smalltalk.
The repository can also be run as a stand-alone RMI-based server by running
main(). This creates a repository object and installs it in
the Naming service running on the host (for example, Naming.rebind
("JavaTypeRepository", new JavaTypeRepository ()). The class path
of the VM running this server should be such that all classes required by
clients of the repository (such as the SST applications) are
accessible. Once started, type definitions are looked-up by sending
lookup(className) to the repository through RMI. This
returns a string containing the class definition.
Start Java with the --D option as follows:
For more information, see
http://java.sun.com/docs/books/tutorial/rmi/running.html
grant {
permission java.net.SocketPermission "*:1024-65535",
"connect,accept";
permission java.net.SocketPermission "*:80",
"connect";
permission java.lang.RuntimePermission "accessDeclaredMembers";
};
java -Djava.security.policy=java.policy <my.class.with.Main()>