PDA

View Full Version : How to Distribute my java class ??



kbagher
February 11th, 2009, 09:18 PM
Hi.
i'm Using Netbeans 6.5
my quistion is:
how can i give my friend any class i wrote , so that he can import it as if he is using java.util.Scanner??

thanks :KS

shadylookin
February 12th, 2009, 02:21 AM
are you asking how you should distribute java programs so that other people can run them? Or are you asking how you should distribute them so that others can import your code into their projects?

Either way I would recommend exporting it as jar file.

kavon89
February 12th, 2009, 05:40 AM
Give your friend the jar file, then have him include (import) the jar into his project, then add an import line.

I don't know how to do it outside NetBeans, but a google search should come up with some more information on importing jar files.

kbagher
February 12th, 2009, 05:55 PM
thanks all for your answers :)