===== 3.1 install Method ===== When the **install(byte[], short, byte)** method is called, the applet instance does not yet exist. The main task of the **install** method within the applet is to create an instance of the **Applet** subclass using its constructor, and to register the instance. All other objects that the applet needs during its lifetime can be created as is feasible. Any other preparations necessary for the applet to be selected and accessed by a CAD also can be done as is feasible. The **install** method obtains initialization parameters from the contents of the incoming byte array parameter. Typically, an applet creates various objects, initializes them with predefined values, sets some internal state variables, and calls either the **Applet.register()** method or the **Applet.register(byte[], short, byte)** method to specify the AID (applet IDentifier as defined in ISO 7816-5) to be used to select it. This installation is considered successful when the call to the **Applet.register** method completes without an exception. The installation is deemed unsuccessful if the **install** method does not call the **Applet.register** method, or if an exception is thrown from within the **install** method prior to the **Applet.register** method being called, or if the **Applet.register** method throws an exception. If the installation is unsuccessful, the Java Card RE shall perform all cleanup when it regains control. That is, all conditional updates to persistent storage shall be returned to the state they had prior to calling the **install** method. If the installation is successful, the Java Card RE can mark the applet as available for selection. Only one applet instance can be successfully registered each time the Java Card RE calls the **Applet.install** method.