Official RAR website
There are examples of calling unrar. dll decompression in various languages, but there is no example of using Java JNI.
The author uses JNI to write a class unrar, which provides the two most common functions to decompress and list file information.
It was updated on July 15, July 28 because an exception was reported when the rarfile in the experiment was used by junrar, but WinRAR can be opened. I checked this file.
It is possible to decompress the package with WinRAR and then decompress the package with junrar, which indicates that the original file compression is not standard. The exception reported by unrar is:
"File is not valid RAR Archive" I can't do anything else, just reflect this exception to the Java exception information.
Some people have too many requirements and are too lazy to write them again.
Jniunrar download link