Hi,
I am giving some steps to do it. Try these steps.
If you have any queries please let me know.
1. Open the Command Prompt
2. Move to your code directory
3. Use the following command to create a jar
jar -cvf filename.jar .
(Make sure the path was set or not)
4. Jar will be created move that file to other system
5. Extract them using the command
jar -xvf filename.jar
Thanks & Regards,
Santhosh Reddy Mandadi
Thnx santhosh
ur reply will be a gr8 help for me.
I made jar file of the application and put it in a batch file along with mail.jar & activation.jar now wat will b the classpath for that so that I can execute it on another machine.I ll try this one:
java -classpath .;abc.jar;mail.jar;activation.jar;Mailer
pause
I put this in a text file & made batch file of it.
and run it but wont work.Do u hv any clue.
Here Mailer is the class file.
Hi
Your command is wrong. You should use space instead of semicolon(;).
It should be (assuming your Mailer class and all the other jar files are in current directory where you execute the following command):
java -classpath .;abc.jar;mail.jar;activation.jar Mailer
If you have a few jars files to use, use the following sample command:
java -classpath %jar_files% %package_name%.%class_name%
e.g. java -classpath .;xyz.jar;anyjar.jar com.whateverpackage.WhateverMain