How to open rar file in java 1.4

I think ZipFile does not support rar file. Which lib is better to use for unpacking rar files and unpacking zip files in java 1.4

+3
source share
4 answers

I was going to suggest a Raroscope , but it only allows you to scan a file. I suspect the best option is to execute rar.exefrom your Java program.

+2
source

Junrar adds support for reading and extracting rar.

He emerged from the old unrar library's sourceforge-host port, which is no longer available, and went to github on https://github.com/edmund-wagner/junrar

https://github.com/junrar/junrar/ maven

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

+2

It seems that not so much. Take a look at this library:

http://www.unrarlib.org/

0
source

For Zip files, I would use Apache Commons / Compress

Rar files are much more complicated. I found almost nothing but an example source file in the JQVKat Google Code project, which uses a library called de.innosystec.unrar, which is supposedly a β€œpiece of shit” (sorry, but this is what it reads). (You can also download the library )

0
source

Source: https://habr.com/ru/post/1761186/


All Articles