It Doesn't work with .Z files , it Only works with .ZIP files.....I need to Extract .Z files not .ZIP
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
.Z files are not ZIP files, they're created using the compress tool. Java can't handle .Z out of the box, and neither can the Apache Commons Compress library.
Tim Moores
.Z files are not ZIP files, they're created using the compress tool. Java can't handle .Z out of the box, and neither can the Apache Commons Compress library.
Sorry but you mean that there no way to Extract .Z files from Java???
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
Of course it's possible. But -.Z not being a common file format any more- there is no widely used Java library for that (or maybe no library at all). In which case you would have to code it, or find a command you could call via the ProcessBuilder class. The UnxUtils contain such a tool for Windows, as does every Unix/Linux distribution in existence out of the box.
I solved it by Executing gunzip Command on Linux and winrare on Windows with RunTime Object from Java. I know that this is not the Optimum Solution but it works for now.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.