开发者

How to open rar file in java 1.4

开发者 https://www.devze.com 2023-01-12 14:44 出处:网络
I guess 开发者_Python百科ZipFile doesn\'t supprort rar file. What lib is better to use to unrar rar files and unzip zip files in java 1.4I was going to suggest Raroscope but it only allows scanning of

I guess 开发者_Python百科ZipFile doesn't supprort rar file. What lib is better to use to unrar rar files and unzip zip files in java 1.4


I was going to suggest Raroscope but it only allows scanning of the file. I suspect the best option is to execute rar.exe from your Java program.


Junrar adds support to read and extract a rar.

It came from an old sourceforge-host port of the unrar library that is no longer available and went to github on https://github.com/edmund-wagner/junrar

The newest version is available in https://github.com/junrar/junrar/ and can be included as dependency in maven as

<dependency>
  <groupId>com.github.junrar</groupId>
  <artifactId>junrar</artifactId>
  <version>0.7</version>
</dependency> 

it is a good option


Doesn't seem to be a lot out there. Take a look at this library:

http://www.unrarlib.org/


For Zip files I'd use Apache Commons / Compress

Rar Files are a lot harder. There's almost nothing I could find, except a sample source file in the Google Code project JDVKat which uses a library called de.innosystec.unrar that's supposedly "a piece of shit" (sorry, but that's what it reads). (You can also download the library there)

0

精彩评论

暂无评论...
验证码 换一张
取 消