Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thoqbk/code-collection

A shell script tool for decompiling multiple jar files and re-arranging source code
https://github.com/thoqbk/code-collection

decompile jar java

Last synced: 24 days ago
JSON representation

A shell script tool for decompiling multiple jar files and re-arranging source code

Awesome Lists containing this project

README

        

# code-collection

## How to use

Checkout project, open the terminal and change directory to code-collection directory by typing:

```
cd /full-path/to/code-collection
```

Run `extract-jars.sh` to decompile all jar and war files which are stored in a sepcific directory
```
bash extract-jars.sh
```
For example, to decompile all java libaries in .m2/repository/com and save source code in directory all-com-library-source-code

![extract jars](https://github.com/thoqbk/code-collection/blob/master/resource/extract-jars.png)

After decompiling all library files, we can collect all specific files (`.html`, `.js` file, for example) by using tool `collect.sh`

For example, to collect all `.html` file from source code directory and store them in `all-html-files`directory:

![collect](https://github.com/thoqbk/code-collection/blob/master/resource/collect.png)

Note that:

1. If set `max depth of the destination directory` to `-1`, the structure of destination directory (`all-html-files`) will be keep the same with the `all-com-library-source-code` directory.

2. If set `max depth of the destination` directory to `0`, all found files will be store in `all-html-files` directory. If a file name has already existed, it will be suffix by a number (ex: `package-1.html`)

## System requirements
1. JDK 1.7 + (for java and jar command)
2. Bash 3.0+

## Author and contact
[Tho](https://github.com/thoqbk/)

Email: [email protected]

## License
The MIT License (MIT)