Import a .jar or .war as a project into you Eclipse IDE, even if you don't have the source by decompiling the jar
Supported project types
- Maven
- PDE Eclipse plugin
- WAR file
- Generic Eclipse project
Usage
- Install the plugin
- File->Import->Other->Jar without source
- Select a jar/war file and click finish
- New project will be created from the jar
Goals
- Validate/audit the content of a jar/war file for potential malicious content
- Think for example jar files downloaded from Maven central. Most of them are not really validated, any of them can potentially contain malicious content.
- Even if the library is open source, compiled version could potentially contain code not present in the source repository, Interesting case study is the original Eclipse decompiler plugin: https://0x10f8.wordpress.com/2017/08/07/reverse-engineering-an-eclipse-…
- Source attachment of a Maven artifact also cannot be trusted, since it is only uploaded to Maven, it can contain anything the author wants, if your IDE shows the source attachment instead of the decompiled source, you IDE can potentially help to hide the malicious code.
- Even if the library owner has no malicious intent, build servers can be compromised to include additional code into an otherwise legitimate library
- Even with valid artifacts tricking caches, MITM and compramising artifactories is possible
- Via this plugin the actual decompiled source can be pulled into Eclipse, where you can manually study it (or even build it).
- Continue the deveopment of a project you no longer have source for.
Limitation
- Compiled jar lacks some information present in the source code, most importantly many generic types, some local variable names, comments, etc., therefore perfect reproduction of the source code is not always possible and sometimes you will see compilation failure which you have to correct manually. This project uses CFR to decompile, issues with the decompiled code should be reported for: http://www.benf.org/other/cfr/
- Sometimes Maven artifact refer to SNAPSHOTs built at the same time they were originally built, however this will not be automatically connected, you have to manually have to change the version or also import other dependencies.
- Sometimes Maven artifacts are missing pom.xml, because they are managed elsewhere, in that case some dependency problems may arise which requires manual fix
Support
For any issue / support raise a ticket on the project's GitHub page:
https://github.com/helospark/import-jar-as-project
Categories: Tools
Additional Details
Eclipse Versions: 2024-03 (4.31), 2023-12 (4.30), 2023-09 (4.29), 2023-06 (4.28), 2023-03 (4.27), 2022-12 (4.26), 2022-09 (4.25), 2022-06 (4.24), 2022-03 (4.23), 2021-12 (4.22), 2021-09 (4.21), 2021-06 (4.20), 2021-03 (4.19), 2020-12 (4.18), 2020-09 (4.17), 2020-06 (4.16), 2020-03 (4.15), 2019-12 (4.14), 2019-09 (4.13), 2019-06 (4.12), 2019-03 (4.11), 2018-12 (4.10), 2018-09 (4.9), Photon (4.8), Oxygen (4.7), Neon (4.6), 2024-06 (4.32), 2024-06 (4.33)
Platform Support: Windows, Mac, Linux/GTK
Development Status: Alpha
Date Created: Friday, December 14, 2018 - 03:05
License: MIT
Date Updated: Monday, February 26, 2024 - 06:30
Submitted by: Helo Spark
Date | Ranking | Installs | Clickthroughs |
---|---|---|---|
September 2024 | 107/602 | 142 | 6 |
August 2024 | 84/641 | 321 | 14 |
July 2024 | 86/663 | 338 | 9 |
June 2024 | 77/681 | 441 | 16 |
May 2024 | 88/682 | 439 | 14 |
April 2024 | 86/687 | 459 | 10 |
March 2024 | 86/694 | 482 | 6 |
February 2024 | 285/687 | 47 | 11 |
January 2024 | 126/691 | 273 | 12 |
December 2023 | 104/671 | 332 | 8 |
November 2023 | 97/686 | 430 | 7 |
October 2023 | 103/673 | 397 | 8 |
Unsuccessful Installs
Unsuccessful Installs in the last 7 Days: 3
Count | Error Message |
---|---|
3 | Cannot continue the operation. There is another install operation in progress. |