Earlier quoted context omitted.
Things may have changed, but my impression as of several years ago was that JD-GUI was far, far behind the state of the art (Fernflower, aka the built-in IntelliJ decompiler) in terms of correctness, re-sugaring, support for modern Java features, and so on. Fernflower is open source as part of IntelliJ: https://github.com/fesh0r/fernflower
Is there a good GUI for this a la jadx-gui that isn't an entire IDE?
Show HN: I wrote a Java decompiler in pure C language
81–90 of 104 posts
Re: Show HN: I wrote a Java decompiler in pure C language
#82You've used GPL2 code taken from git (hashmap.c) in your Apache 2.0 project. https://opensource.stackexchange.com/questions/10737/inclusi...
I'm curious, how did you notice this? Do you have a scanner that checks these sorts of things or is it something that you are passionate about?
Re: Show HN: I wrote a Java decompiler in pure C language
#83I don't think it's available in a standalone repo but it IS available as a standalone library, IntelliJ's FernFlower decompiler is the gold standard https://github.com/JetBrains/intellij-community/blob/master/... https://www.jetbrains.com/intellij-repository/releases I guess there's some history there that I'm not familiar with because JBoss also has a FernFlower decompiler library https://mvnrepository.com/artifact/…
Re: Show HN: I wrote a Java decompiler in pure C language
#84Can you also write a C decompiler in pure Java language?
Re: Show HN: I wrote a Java decompiler in pure C language
#85You've used GPL2 code taken from git (hashmap.c) in your Apache 2.0 project. https://opensource.stackexchange.com/questions/10737/inclusi...
I'm curious, how did you notice this? Do you have a scanner that checks these sorts of things or is it something that you are passionate about?
1. How silly to write such a thing in C from scratch. Such a project will invariably invent half of Lisp in order to have the right kind of infrastructure for doing this and that.
2. Let's look for some of it up and down the tree. Oh look, there is a bitset and hashmap, see? I don't see test cases for these anywhere; is it original work from this project or battle-tested code taken from elsewhere?
3. Open hashmap.c ...
GPL violation found in half a minute.
Re: Show HN: I wrote a Java decompiler in pure C language
#86Earlier quoted context omitted.
I am writing the part of decompiling dex and apk. The current speed is about 10 times faster than that of Java, and it takes up less resources than Java. And the compiled binary is smaller, only about 300k. Thank you for your attention.
> 10 times faster than that of Java I was hoping that these days' Java would be "almost" as fast C/C++. Oh well.
Re: Show HN: I wrote a Java decompiler in pure C language
#87I am always curious how different C programs decide how to manage memory. In this case there are is a custom string library. Functions returned owned heap-allocated strings. However, I think there's a problem where static strings are used interchangably with heap-allocated strings, such as in the function `string class_simple_name(string full)` ( https://github.com/neocanable/garlic/blob/72357ddbcffdb75641... ) Somet…
static bool is_java_identifier_start(char c)
{
return (isalpha(c) || c == '_' || c == '$');
}
Undefined behavior in isalpha if c happens to be negative (and not equal to EOF), like some UTF-8 byte.I think some implementations are hardened against this issue, but not all.
Re: Show HN: I wrote a Java decompiler in pure C language
#88Earlier quoted context omitted.
I'm curious, how did you notice this? Do you have a scanner that checks these sorts of things or is it something that you are passionate about?
By the following very short garden path: 1. How silly to write such a thing in C from scratch. Such a project will invariably invent half of Lisp in order to have the right kind of infrastructure for doing this and that. 2. Let's look for some of it up and down the tree. Oh look, there is a bitset and hashmap, see? I don't see test cases for these anywhere; is it original work from this project or battle-tested code…
Re: Show HN: I wrote a Java decompiler in pure C language
#89Earlier quoted context omitted.
I'm curious, how did you notice this? Do you have a scanner that checks these sorts of things or is it something that you are passionate about?
I'm not them, but it does straight up say in hashmap.c that the code was copied from https://github.com/git/git/blob/master/hashmap.c , which is under the GPL license.
Re: Show HN: I wrote a Java decompiler in pure C language
#90I cannot help but wonder why starting a new project in C in 2025. It’s like driving a car with no seat belts. You sure you want to do that?
But stupid real-world analogies are stupid.