This greatly depends on the tool you are using for building the jar-Files. But probably those tools already have a mechanism in place to exclude classes / files from the jar-File. A classic tool would be ant. If you are using ant, this link should provide information to you: How to exclude a directory from ant fileset, based on directories contents
If you are using a different tool, please edit your question.
On a sidenote: Are you really sure you want to use a Java Applet for a Client/Server Application. If you prefer an applet because you can distribute it easily, consider using Java Web Start.