How to tar two files and gzip them

I have a requirement where I have to tar two text files and then gzip them. I know there is a java class file where you can gzip files, but I am sure if there is one for tar…
I was hoping if someone have done this before…I am using webMethods B2B 4.0 and Windows 2000 for operating system.