Both .cab and .jar files are in essence just compressed containers that contain other files. Which means that you should be able to repack the files should you really need it with some file archivers.
However, pretty often .cab and .jar files are used as installation packages. A simple repack from one to another won't help you if you are trying to transfer these packages in order to install programs on a different platform.