custom libraries

this may seem like an extremely nooby question, but when creating a custom jar to use in other programs, does it need a main function or can i just use the other programs.

-thanks