Hi, does anyone know a library that makes it possible to create a cabinet file in pure Java?
As far as I know, you can only create .cab files using the CABARC utility from Microsoft. So there is no "pure java" implementation.
You can call something like:
CABARC n myArchive.cab *.*
using Runtime.getRuntime().exec() to create myArchive.cab.
In Java you would normally create a JAR file using the utility called jar. If you use a build system such as ant or maven it has direct support for building JAR files.
To get started you can use Java's DeflaterOutputStream to do Deflate compression which is one of the supported cab compression schemes.
Oh whaddaya know... I found one: cablib (but it's not in development since 2006)
Hi
I wrote a java application to do this (pure java implementation). It does not support compression and so it basically just packages the files together and adds the cabinet header to the system. It isn't too complicated to do, took me about a day to bash it out.
Not too sure how complex it would be to implement compression but I assume it would not be all that trivial. There is a fair bit of information available on the net on the structure of the cabinet file format.
Regards, Graham