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


is needed. With this and the usual java -> scala (val in definitions), the answer in works for example.