Let's take a quick look at the differences between Java applications and applets. If you write an application, you must define a main entry point in which you can execute the RMI startup code. You must then install the application's class files on the client machine. If you have multiple client computers, you must manually install the application's class files on each. And, as we will see in a while, you will also need to install some RMI-related server files on the client application computer.

If you decide to write an applet instead, you won't have a main entry point. Instead, the applet overrides the "init" method, which is called by the browser. You can do the same sort of code in init that you would in an application's main. The main advantage of applets is that you don't need to pre-install anything on the client computer except for the browser - the RMI and Java infrastructure will download all of the required class files automatically. Note that you do need to write an HTML file that the browser can load, though - we will cover all of this coming up.