As spark is a java swing application, can it be modified to run as a web application using an applet or java web start.
Regards
Ollyando
As spark is a java swing application, can it be modified to run as a web application using an applet or java web start.
Regards
Ollyando
Hi ollyando,
For internal testing, that is exactly what we did using Web Start 1.4+. It is possible using the current structure as long you digitially sign the jars both in the lib dir and windows
dir. Take a look on signing at http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/development.html#s ecurity.
thanks for the info.
so which files would i need to put on the webserver.
So all jar files under the spark install as well as any jni files will need to be packaged in a jar and specified as native in your jnlp.
okay so these are the files i have found.
Directory of C:\Program Files\Spark.install4j
18/11/2005 14:50 322,405 i4jruntime.jar
18/11/2005 14:50 1,837,421 user.jar
Directory of C:\Program Files\Spark\jre\lib
18/11/2005 14:51 1,909,575 deploy.jar
18/11/2005 14:50 81,799 jce.jar
18/11/2005 14:51 493,381 jsse.jar
18/11/2005 14:51 997,372 plugin.jar
18/11/2005 14:51 33,763,780 rt.jar
Directory of C:\Program Files\Spark\jre\lib\ext
18/11/2005 14:50 8,176 dnsns.jar
18/11/2005 14:50 153,235 sunjce_provider.jar
18/11/2005 14:50 175,811 sunpkcs11.jar
Directory of C:\Program Files\Spark\jre\lib\im
18/11/2005 14:50 10,233 indicim.jar
18/11/2005 14:50 7,945 thaiim.jar
Directory of C:\Program Files\Spark\jre\lib\security
18/11/2005 14:50 2,919 local_policy.jar
18/11/2005 14:50 2,435 US_export_policy.jar
Directory of C:\Program Files\Spark\lib
17/11/2005 15:26 49,510 activation.jar
17/11/2005 15:26 4,417,164 base.jar
17/11/2005 15:26 171,462 smack.jar
17/11/2005 15:26 50,845 smackx-debug.jar
17/11/2005 15:26 163,676 smackx.jar
17/11/2005 15:26 1,837,639 spark.jar
Directory of C:\Program Files\Spark\lib\windows
17/11/2005 15:26 74,846 jdic.jar
could not find any jni files. all these need to be places in a jar file?
any help on the command to bag them up?
K. So here would be the layout.
activation.jar
base.jar
smack.jar
smackx-debug.jar
smackx.jar
spark.jar
Under windows dir, add the IeEmbed.exe, jdic.dll, MozEmbed.exe and tray.dll into a jdic-native.jar file.
Add the jdic.jar and jdic-native.jar to the jnlp list, specify the jdic-native as a native element.
Then the main class is com.jivesoftware.JiveTalk (Note: The main class will be renamed in an upcoming release to just Spark).
Sign each jar and deploy it
Also, if you want to use with a Socks Proxy, you can pass in socksProxyHost and socksProxyPort into the arguements section of your jnlp.
Well i got a bit further today,
created my jar files.
signed them.
and created the jnlp file.
But I get this error when trying to start the application.
An error occurred while launching/running the application.
Title: Instant Messenger
Vendor: Cayman Islands Government
Category: Launch File Error
Could not find main-class com.jivesoftware.JiveTalk in http://cslnas22.admin.gov.ky:7779/messenger/jdic.jar
my jnlp file looks like this.
maybe my signing didn’'t work?
Hi Ollyando,
So you need to include all the jar files as part of the jnlp.
ex.
okay one step further,
I just get this error message now. when i try and sign the base.jar file
jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: META-INF/LICENSE.txt
hmm. Ok ollyando. Let me put together a sample web start agent that you can download. I will post when it is done.
Cheers,
Derek
Hi Alex,
I have a war file that contains the spark invokable via WebStart. You will just need to sign the jars with your own certificate.
Cheers,
Derek
can i have a copy of the war file?
thanks
orlando
Hi Orlando,
Check your private messages
hi,
Got the war file, thanks ,
unzip the contents and tried to sign the jar files.
still getting error message on the base.jar file.
$ jarsigner -keystore myKeystore base.jar myself
Enter Passphrase for keystore: XXXXXX
jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: META-INF/LICENSE.txt
Am i doing this correctly?
i deleted the multiple entries in the base,jar file
jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: META-INF/smack.providers
jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: META-INF/LICENSE.txt
i can now sign the file.
not sure if this was the correct thing to do.
now when i try and start the application i get the following error.
An error occurred while launching/running the application.
Title: Instant Messenger
Vendor: Cayman Islands Government
Category: Launch File Error
Could not find main-class com.jivesoftware.JiveTalk in http://cslnas22.admin.gov.ky:7779/messenger/jdic.jar
the launch file is as follows.
I got it working
i took out those duplicate entries from the base.jar file and used the jnlp file that came in the war file.
After resigning everything.
it loads up fine.
Thanks for all your help.
Now would it be possible to pass in some paramters to pass the username and password to login the user automatically!!! Then I could fully intergrate with my intranet.
I have that scheduled for the 1.0.1 release coming out next week. So you will just need to replace the spark.jar when it’'s released
Thanks for the update.
Would it also be possible to add to that release, a parameter for example called chatto_jid or something like that to start up a conversation window with someone directly.
If so I could then display a person’'s presence on my intranet site with a link to chat with them directly.
Regards
Orlando
That’'s a good question. I think it would be a good idea to have a list of agreed upon arguments that spark would accept. So far the list is the following:
username
password
server
start_chat_jid
Any other ideas? Options?
Cheers,
Derek