Java issues and tips

Java remote method invocation problem

Problem: When running a demo of Java’s remote method invocation on our Ubuntu 9.04 based linux machines running java-6-openjdk the client could only attach to a server running on the same host.

Solution: Professor Ellman discovered that the fix was to explicitly tell the server its hostname or IP address.  This was accomplished by adding -Djava.rmi.server.hostname=[IP or Name of HOST] to the java command when starting the server, so for a server named hopper with an IP address of 10.0.0.63 you could do either:

java -Djava.rmi.server.hostname=hopper hellormi.HelloServer

or                                                                                                                                                         

java -Djava.rmi.server.hostname=10.0.0.63 hellormi.HelloServer

both of which worked.

Without specifing this option the server was only listening on the loopbak device.

sysnews/java_system_tips.txt · Last modified: 2009/09/24 14:09 by priestdo
VCCS Top Events Extended Site Search Login Vassar Science Web Vassar Home Driven by DokuWiki Valid XHTML 1.0