Create archive file from a collection with Scala?

I’am trying to create a zip file using scala language, I know there is java library for that (zipoutputstream),
but it could not work for me, so I’am asking How we can create a zip file that contains text file.

When using java in scala, one needs additional imports, in this case

import java.io._, java.util.zip._

is needed. With this and the usual java -> scala (val in definitions), the answer in https://stackoverflow.com/questions/1091788/how-to-create-a-zip-file-in-java works for example.

regards,
Siddhartha