If you are running Instant Messenger using Java Web Start, you can modify the im.jnlp, imres.jnlp, and imres.jar files to customize the user interface. The following are modifications that can be made to these files:
imbrand.jar - This file contains the image and audio files, and the properties that can be customized. You need Java Developers Kit 1.3 (JDK) to extract the contents from the imres.jar file using the jar command. For more information on imbrand.jar contents, see Contents of imbrand.jar.
Use the following command to extract imbrand.jar:
jar xvf imbrand.jar |
This command creates a directory tree where the resource files are copied. This directory structure has to be maintained when you modify the individual files in the .jar file.
You can substitute your version of .gif files or .wav files, without changing the file names and then place the changed files back to the directory using the following jar command:
jar -uf imbrand.jar com/Sun/im/client/images/*.gif |
This command updates the imbrand.jar file with the modified .gif files. The same is possible with the audio files (.wav files).
im.jnlp - this file invokes the Java Web Start version of the Instant Messenger application. You can modify the codebase, title, vendor, and descriptions in the file.
Example 15–1 shows a sample im.jnlp file with the HTML code that can be customized in bold typeface.
<?xml version="1.0" encoding="utf-8"?> <!-- Instant Messenger --> <jnlp spec="1.0+" codebase="http://im.i-zed.com:80/im" href="en/im.jnlp"> <information> <title>Instant Messaging</title> <vendor>I-Zed.com</vendor> <homepage href="http://www.I-zed.com/"/> <description>I-Zed’s Sun Java System Instant Messenger</description> <description kind="short">Instant Messenger</description> <icon href="CompanyLogo.gif"/> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.3+"> <resources> <jar href="en/imres.jar"/> <jar href="en/imbrand.jar"/> </resources> </j2se> <jar href="messenger.jar"/> <jar href="imdesktop.jar"/> <jar href="imnet.jar"/> <jar href="icalendar.jar"/> <nativelib href="imjni.jar"/> </resources> <application-desc main-class="com.iplanet.im.client.iIM"> <argument>server=im.i-zed.com:45222</argument> <argument>help_codebase=http://im.i-zed.com:80/im/en</argument> </application-desc> </jnlp> |
In the im.jnlp file, the argument <argument>servername</argument> represents the Instant Messaging multiplexor host and port. If you change the default value of the iim_mux.listenport parameter, you need to change the servername value to host.domain:port.