Java tutorial on file exchange: why put the document in a jar before encryption?
===

I want a user to sign a document using asymetric key.

I read the tut here http://docs.oracle.com/javase/tutorial/security/toolfilex/index.html

I don't understand why the tut requested to put the doc in a jar and afterwards sign the jar. How can I do this at runtime for a user who would upload any document to sign if I need to put it in a jar ? 

Is there any other tut from SUN to do a real digital signature ?

