The server URL (line 24) corresponds to the deployment scheme presented in Listing 5.12
(discussed later in the J2EE section of this chapter, together with the details of the client-server
The security implementation has been kept minimal—don't lengthen too much of the code.
Methods such as scramble (lines 66-68) for encrypting sensitive strings and unscramble (lines
73-75) to decrypt them are just illustrative. Data is encrypted, both when saved persistently on
the client device and when transmitted to the server for validation.
This class uses the persistence service offered by the MIDlet profile. This way, thanks to the
persistent data stored in the hosting device, the MIDLicenseManager instance is able to recog-
nize an already registered copy and will alert the user, as depicted in Figure 5.6.
F IGURE 5.6
The response of the registration procedure for an already registered copy.
Next, we will see another case of a non-J2SE deployment, also with a concrete example.
Java Card Applet Deployment
In this section, we will give an overview of the deployment issues of the smallest Java comput-
ing environment currently commercially used: the Java Card platform. We will begin with a
brief presentation, leveraging our knowledge of other Java platforms by describing the differ-
ences and then we will see an example of deployment.
The Java Card Environment is a world apart from J2ME devices. The differences are both
in the hardware limitations and a completely different lifecycle from the usual interactive