Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does compilng java code to exe (e.g. using Launch4Java) ensure code cannot be reversed engineered?

After experimenting myself, I am convinced that java code obsfucation is not safe in terms of preventing reverse code engineering. So, I turn to using Launch4J to bundle one of my core jar file into a single EXE file. The jar file contains the main entry method as well. Is this going to protect again code reverse engineering?

like image 553
SS. Avatar asked Jul 05 '26 10:07

SS.


2 Answers

If a computer can run it, a human can reverse engineer it.

like image 145
Thorbjørn Ravn Andersen Avatar answered Jul 06 '26 23:07

Thorbjørn Ravn Andersen


Launch4J doesn't translate your Java code into native executable code, it just provides a native launcher that looks for a JDK and has your JAR as a resource (either packaged inside the executable or not). This is just a convenience - not security. If your JAR is external to the executable, someone can reverse engineer your code like a regular Java application. If your JAR is packaged into the executable - Presumably, someone programmed the logic to wrap the JAR in the executable, and someone can program the logic to unwrap the JAR from the executable (or use one of many tools that can extract resources from executables) - and can then reverse engineer your code like a regular Java application.

like image 25
Nate Avatar answered Jul 06 '26 23:07

Nate



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!