powered by Jive Software

Creating JAR file (where to store smack.jar)

Hi,

I am bit confused here…I am trying to create a JAR file to from a compiled Java class…when I create a JAR file, do I have to store the smack.jar,smackxx.jar in the same folder as my package?

I am totally confused…any help would be appreciated.

Thanks,

Veena

The smack jar files will just be distributed with your jar file, it won’'t be inside your jar file.

So when you deploy your app you will need to deploy:

.jar

smack.jar

smackx.jar

could you tell me the steos to creating a jar file?

Hi Veena,

you could use a standard zip program to do this and then change the extension form .jar to .zip.

Or as you have the JDK installed you probably need to add jar.exe to you path, it’'s located somewhere in the JDK directory.

“jar cmf META-INF/MANIFEST.MF…/file.jar *” or

“jar cfm …/file.jar META-INF/MANIFEST.MF *” (be aware of the order of f and m)

should create a jar file.

LG

Hi,

I am using a manifest file to set Main-Class…But when I add the Class-Path to smack.jar in the same manifest file it gives me error. How do I set the Class-path to smack.jar file?

Thanks,

Veena

Hi,

I figured out the problem…I had extra space between the attributes…I got rid of them and now the jar file is created and it is working fine.

Thanks,

Veena

hi veens…

I too want to create a client to chat.i am using wildfire as my server.i want to use smack as i cannt use other clients in my application.I hav no idea of how to even start with smack…do i need to write .java files.if so can u help me with the code…plezz help me…

i need it vry vry urgently…

Hi Ammu,

did you setup a development environment? Smack comes with a lot of examples so after download you should be ready to start. You need to write your own java files / classes, Smack is just the API without graphical interface.

LG

Hi Ammu,

if you want to use the Smack API in your application you have to write the java classes to connect to the Wildfire server …Smack documentation and javadocs are pretty helpful.I am not sure what you are trying to do but go through the forum…that might help you too

Veena