#! /bin/bash # if you're not familiar with shell script, don't panic - the strange bits are just there to automatically stop rmiregistry after the server stops rmiregistry & RMI_PID=$? java -cp . -Djava.security.policy=permissive.policy Server kill $RMI_PID wait