Q:

How to pack java project? 

I have made a java project and want to deliver it to a client but I don't want to deliver it as a jar file as the client can see the source code easily by unpacking the jar file. 
How can I pack my java project so client cannot look at the source code or cannot change the source code? 
One more thing, Can I integrate a key functionality so that client can only access that software by first registering it with the key provided by me? 
Second, can I integrate another functionality through which the software can run only on  a single machine through that key? 
Remember, the software should still have the cross-platform functionality and if it is not possible then how can I made it for Debian Linux as I have made it on Windows. 

A:

To your first point.  Why not only jar up the class files?  These are in byte code so the client will not be able to view the source. 
As to providing a key.  This can be done and there are libraries that allow this, but be careful as , to my knowledge at least, there has yet to be developed a DRM system that hasn't been cracked.  and most users do not like software restricting what they can do.  The same point applies to your third question.