Hi guys, we can decompress file with postfix .zip(use tool of winzip compressed) use jdk's ZipFile class,but How I can decompress file with postfix .rar(use tool of winrar compressed)? I have renamed it with postfix .zip,but I got error.maybe it use different compress algorism than winzip.Are there any way that I can decompress .rar file? thanx.
i never heard of an existing API for rar de/compression in java. i'm not sure either if the algorithm is available to public here's a feasible workaround: - get the native library e.g. UNRAR.DLL - use JNI to call native methods mavedrive;
See Sun's JNI Tutorial. The format is known, though, so another alternative is to write the decoder yourself. See this document from Wotsit's File Formats, a very useful web site!