powered by Jive Software

For applet experts

this is so crazy… I’'m trying to write an applet client (yes, it has to be an applet…)

for known issues w/applets I decided to incorporate my applet into smack package instead of importing the package… so downloaded package w/source code and decided to go from there… for now, while I’‘m starting out and just figuring out how to get an applet to run before I start seriously developing, I have called my applet achat.java and it’'s here… org\jivesoftware\smack… with ant build that come w/src code was able to successfully compile and jar entire package… so now have smack.jar in same dir where index file is that contains (XMPPConnection.java:111)

at org.jivesoftware.smack.achat.init(achat.java:30)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

I don’‘t understand these security errors… I mean applet won’'t even RUN… (get msg @ bottom of browser ‘‘applet not intitalized…’’)

before I started out w/applet, decided to try out w/a jsp (simpler to test, etc…) to make sure I’'m connecting to server ok w/smack package and stuff, and had no problems w/jsp importing package…

pls help, it’'s been two days now… this is driving me nuts…

thank you very much…

thank you very much…

now I’'m getting this error…

Error! A startup class specified in smack-config.xml could not be loaded: org.jivesoftware.smackx.ServiceDiscoveryManager[/b]

doesn’‘t it say (in README file) you don’'t need smackx package?

(“The smack.jar file in the main distribution folder is the only binary file required for embedding XMPP functionality into client applications. The optional smackx.jar contains the Smack extensions while smackx-debug.jar contains an enhanced debugger.”)

so why is it looking for a class in smackx package?

thank you…

(I’‘m same person who posted orig post, but came home tonight (so was on different machine) and didn’‘t remember password and had to set a new acct, that token-id thing they send doesn’‘t work… it kept saying passwords don’'t match…)

thank you…

Service discovery is considered an extension (it’‘s not part of the core protocol), which is why you need to use smackx. To write a full-featured client you’'ll almost always need to use smackx.



ok, my applet is part of smack package, how do I make it part of this other package also? I have, at the top of applet:

package org.jivesoftware.smack;

I can’'t also do this, can I?

package org.jivesoftware.smackx;

(applet can only be inside one package at once…:wink:

why isn’'t everything then part of same package??

(sorry, don’'t know what “service discovery” is, or what an extension is…)

can u pls explain what these are…

http://www.jivesoftware.org/builds/smack/docs/latest/documentation/extensions/in dex.html

thank you…

ok, I see now what happened, I had moved smack.jar… (and smack.jar and smackx.jar were in diff. locations…) now all errors I get are these:

java.security.AccessControlException: access denied (java.net.SocketPermission jabber.org resolve)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkConnect(Unknown Source)

at java.net.InetAddress.getAllByName0(Unknown Source)

at java.net.InetAddress.getAllByName0(Unknown Source)

at java.net.InetAddress.getAllByName(Unknown Source)

at java.net.InetAddress.getByName(Unknown Source)

at java.net.InetSocketAddress.(XMPPConnection.java:111)

at org.jivesoftware.smack.achat.init(achat.java:30)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

what do these errors mean, please?

thank you…

Have you signed your applet to allow it run outside of the sandbox? It looks like you have not. You will not be able to use the smack sockets if the applet is unsigned. To sign your jars, take a look at http://java.sun.com/docs/books/tutorial/jar/sign/signing.html

ok, how do I do this, pls…??

they say to type stuff in command line, like “jarsigner jar-file alias”…

what do I type for “alias”?? it says:

“alias is the alias identifying the private key that’‘s to be used to sign the JAR file, and the key’'s associated certificate.”

what’‘s the “private key”? I don’‘t see anything about this in smack domentation (I searched) it says in this page for which u sent me url, “This basic form of the command assumes that the keystore to be used is in a file named .keystore in your home directory.” how do I create this file? what does it have to contain? and what do they mean by “home directory”? are they assuming applet is in yr “home directory”? (whatever that is in this case…) doesn’'t it have to be where applet is (or jars are?)

(are they maybe assuming you’‘re on unix here? I’'m on tomcat locally on my windows 2000 machine…)

and what about “alias”? how do you create an alias? it doesn’'t say on this page either… I have never done this and need help here… thank you…