com.ibm.sst.JavaTypeRepository
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.
Tip icon
For Java 1.2, the Java security manager must grant access to the ports that RMI uses. Otherwise, when you try to bind a remote object to the RMI Registry, an error is returned. An example java.policy file is as follows:
grant {
permission java.net.SocketPermission "*:1024-65535",
"connect,accept";
permission java.net.SocketPermission "*:80",
"connect";
permission java.lang.RuntimePermission "accessDeclaredMembers";
};
Start Java with the --D option as follows:
java -Djava.security.policy=java.policy <my.class.with.Main()>
For more information, see the tutorial found at the Sun Developer Network web site http://java.sun.com/docs/books/tutorial/rmi/running.html
Last modified date: 04/21/2020