Explain the steps used to deploy SWT/JFace-based application with Java Web Start.
Some of the operating system specific libraries are to be loaded for SWT applications before they can execute. The combination of SWT application with Java Web Start provides powerful tools to deploy the client side applications.
To test a Java Web Start application the following are the prerequisites:
Microsoft Windows XP or Red Hat Linux V8
Java 2 SDK, Standard Edition V1.4 or later
Apache Ant V1.5.3 or later
Apache Jakarta Tomcat V4.1.24 or later
The steps for deploying:1. Install the application in the required directory
2. Signing the code and security:
SWT is tightly integrated with the operating system's native windowing environment. SWT uses a system library to manage the platform independent API and the supporting operating system. All the required JAR files deployed with Java Web Start must be digitally signed. Self-signed test certificate is needed to be created, as the specific application is not going to deploy for wide user base.
a). Creation of self-signed certificate:
Execute the command in the directory where the application is to be deployed:
keytool -genkey -keystore keystore -alias myself
A prompt message will be displayed stating to enter the password, name, locality etc. During the ANT build process, the actual signing the JAR files will be completed.
b). To verify that the keystore was properly created, type the following command:
keytool -list-keystore keystore
3. Build the file using the ANT
a). To clean the environment, type: ant clean
b). To execute the build process type: ant
4. Give a trial to execute the application using the command: ant run
5. To deploy the application to Apache Tomcat web server:
a). Place the application’s .war file into webapps directory under Tomcat.
b). Execute the script to start Apache Tomcat
c). Open the web browser and type http://localhost:8080/index.html. Now click on Launch application.
6. Click on Start in the displayed dialog box to start the application.