powered by Jive Software

Smack Newbie

Hi there,

I have got Jive IM server and Spark running across my company.

Am I right in thinking I would be able to put Smack through my Intranet as a web based IM? I’‘m no Java programmer, so I’'m getting kind of lost…

Any help on how to kick things off would be much appreciated.

Message was edited by:


Smack is actualy a library that is used to help developers in creating an IM client. There are several options for you if you are looking for something web based. Spark can be deployed in java web start for instance. If you let us know about your use case we may be able to help you find an appropriate solution.


Thank you Alex, that’'s a helpful start!

I’‘m the Web Developer for my company, and I am currently redeveloping it’‘s Intranet site. I would love to be able to implement some kind of IM through the Intranet itself, rather than deploying Spark to everyone’'s desktops.

The Intranet itself is coded in ColdFusion, but as I mentioned before, I have very little understanding of Java.

Many thanks,



You may want to look into deploying Spark via Java’'s WebStart. This would allow users to click on a link, say on your internal website, and then Java WebStart would do the rest.

This would download the Spark software (jarfiles) to the clients machine, but WebStart handles things like updates for you (each time the user starts a program, WebStart checks for a newer or updated version).

If your interested in this type of solution, I can give you more detailed information on how to deploy something via WebStart.


Hi Ken,

Many thanks for the help.

I think this will definetly be the way to go, but with no Java knowledge any assistance you can offer would be grateful.

I have JRE 5.0 Update 6 deployed on the webserver ready, as well as the latest JDK.

Here goes…

Step 1:[/b]

You’'ll need to jar up a few system and jni files. Run the following commands from Spark/lib/windows and Spark/resources:

C:\jar cf jdic-native.jar IeEmbed.exe jdic.dll MozEmbed.exe tray.dll


C:\jar cf jni-native.jar jniwrap.dll jniwrap.lic


Step 2:[/b]

You’'ll need to sign all the Spark jar files. Go to the lib directory of your Spark installation. Type:

keytool -genkey -alias spark[/b]

If you don’‘t already have a keystore password, you’'ll be promted to create one. Make your way through the rest of the prompts. The last prompt will ask you to '‘Enter key password for ‘’ - for this example I used ‘‘password’’ (without the single quotes). Note also if this is your first time running the keytool, you’‘ll be asked for a storepass - we’‘ll assume that’'s also set to ‘‘password’’.

Now that the key has been generated, we need to sign the jar files. I usually make a .bat file and put it in the top level directory of whatever it is I’'m signing (Spark in this case). Heres a look at the .bat file I created and:

jarsigner -storepass password -keypass password lib/activation.jar spark

jarsigner -storepass password -keypass password lib/base.jar spark

jarsigner -storepass password -keypass password lib/spark.jar spark

jarsigner -storepass password -keypass password lib/smack.jar spark

jarsigner -storepass password -keypass password lib/smackx.jar spark

jarsigner -storepass password -keypass password lib/smackx-debug.jar spark

jarsigner -storepass password -keypass password lib/windows/jdic.jar spark

jarsigner -storepass password -keypass password lib/windows/jdic-native.jar spark

jarsigner -storepass password -keypass password resources/jni-native.jar spark


Step 3:[/b]

Next, you’‘ll need to create the JNLP file. This file is what Java WebStart uses to launch the application. This file could be put anywhere - I’‘ve located it in the Spark directory. Here’'s the JNLP file:


Step 4:[/b]

All you need now is a link to the JNLP file on a web page so that users can launch the application.


Edited by kenneth.orr

Thanks Ken,

The application begins to load, however it hits the error “Unable to launch Spark” and in the background window it is requesting activation.jar.

This is the more detailed error:

An error occurred while launching/running the application.

Title: Spark

Vendor: Jive Software

Category: Download Error

Unable to load resource: file://

Is it a simple matter of it not looking in the right place for the file?

Hi Ken,

I have got past the problem, but I’'m hitting another:

The prob seems to be with base.jar - I can’'t seem to sign it. Every time I try I get an error stating:

jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: META-INF/LICENSE.txt[/b]

Sorry about the last problem…I removed the typo from the JNLP code in the orginal post (there should only have been one class of type main, which should have been spark.jar).

Now for the second problem…

  1. /bMake a copy of your base.jar file and save it as base-old.jar (in case you need it in the future).

  2. /bOpen base.jar with WinZip and delete two of the three versions of the LICENSE.txt file as well as one of the versions of the two versions of smack.providers.

  3. /bRe-sign everything and you should be all set to run.


Message was edited by:


Thanks Ken, I can now get the application pushed out through a web page.

Still got a few niggles running it though:

  1. The app loads fine, but no contacts are displayed, online or offline.

  2. If the user closes the app, it remains active but they cannot get to it again, and clicking the web link does nothing as there is already an active connection to Spark.

Many thanks,



Great! Glad to hear it’'s mostly working for you. You may want to try adding lib/windows/jdic.jar to the JNLP file as well (and also to the .bat file that does the signing).


Cheers Ken, I’'ll give that a go.

This might sound really dumb, but for some reason when i am trying to sign the .jar files, it throws up an error as if it was trying to rename the file!?


That will happing if you still have a process running that is using the jar files. The jar signer does actually modify the original jar by adding the new signature, so you’‘ve got to make sure there aren’'t any processes holding write locks.