JObfuscator
JObfuscator is a source code obfuscator for the Java language. Protect Java source code & algorithms from hacking, cracking, reverse engineering, decompilation & technology theft.
Install / Use
/learn @PELock/JObfuscatorREADME
JObfuscator — Java Source Code Obfuscation & Protection
JObfuscator is a source code obfuscator for the Java programming language. It can protect your Java source code and algorithms from hacking, cracking, reverse engineering, decompilation, and technology theft.
JObfuscator employs a variety of obfuscation techniques to protect & conceal the true functionality of your Java source code.
It renames all variables and methods, obfuscates the code flow by making it non-linear, and encrypts all strings with our cutting-edge polymorphic string encryption engine.
More technical details, downloads, documentation available at:
https://www.pelock.com/products/jobfuscator

It's available for Windows & Linux (requires Mono):
https://www.pelock.com/products/jobfuscator/download
Multiple programming APIs available:
https://www.pelock.com/products/jobfuscator/api
An online obfuscator interface:
https://www.pelock.com/jobfuscator/
Java decompilation is a huge problem
Applications written in Java and compiled to JAR, WAR or CLASS formats are vulnerable to decompilation.
There are a number of decompilers that can almost completely recreate the compiled code back to Java source.
The problem is that the compiled Java code is written as a so-called bytecode for the JVM (as opposed to the native CPU code like x86 or x86-64).
In addition to being perfectly perfectly documented, this form of code allows for very accurate reproduction of the original instructions in high-level Java source code.
What can Java decompilers do?
Take a look at this example:

This is decompiled Java code! All the variable, property and method names are readable. You can even easily navigate through the entire decompiled project, jumping from one class to another.
Are you surprised? It could be your software analyzed by the competition, hackers, crackers or anyone else.
Technology & Intellectual Property (IP) Theft
What could they do with it? Most of the time, the software or its algorithms are stolen or replicated in competing products.
In some other cases, the software gets cracked, clearly visible license checks in decompiled source code are patched or even the entire cracked software is recompiled and published on pirate sites.
Java source code obfuscation
Obfuscation is the process of transforming Java source code into a protected version of itself.
The functionality remains unchanged, everything works the same, but the source code and the final compiled bytecode are protected from reverse engineering analysis, even after the decompilation.
Sample Java source code before obfuscation
import java.util.*;
import java.lang.*;
import java.io.*;
//
// you must include custom annotations to enable
// entire class or a single method obfuscation
//
@Obfuscate
class Ideone
{
//@Obfuscate
public static double calculateSD(double numArray[])
{
double sum = 0.0, standardDeviation = 0.0;
int length = numArray.length;
for(double num : numArray) {
sum += num;
}
double mean = sum/length;
for(double num: numArray) {
standardDeviation += Math.pow(num - mean, 2);
}
return Math.sqrt(standardDeviation/length);
}
//
// selective obfuscation strategies can be applied
// for the entire class or a single method (by default
// all obfuscation strategies are enabled when you
// use @Obfuscate annotation alone)
//
//@Obfuscate(
// remove_comments = true,
// crypt_strings = true,
// rename_methods = false,
// rename_variables = true,
// shuffle_methods = true,
// mix_code_flow = true,
// ints_to_arrays = true
// )
public static void main(String[] args) {
double[] numArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
double SD = calculateSD(numArray);
System.out.format("Standard Deviation = %.6f", SD);
}
}
The same Java source code after the obfuscation
////////////////////////////////////////////////////////////////////////////////
//
// An output from JObfuscator v1.04 - Bartosz Wójcik
//
// Website : https://www.pelock.com/products/jobfuscator
// Version : v1.04
// Params : /MixCodeFlow /RenMethods /RenVars /ShuffleMethods /IntsMathCrypt
// /CryptStr /IntsToArray /DblsToArray
// New lines : Windows (CRLF - \r\n)
// Date : 05.08.2021
//
////////////////////////////////////////////////////////////////////////////////
import java.util.*;
import java.lang.*;
import java.io.*;
import java.lang.Math.*;
class Ideone {
public static void main(String[] args) {
double[] var_3643 = { 11.281129091070447, 8.215990040064463, 9.335603284152908, 6.577895383020224, 7.877805395297853, 0.9548404018895811, 5.272519318820092, 12.245640663335054, 1.9976550397430217, 10.498728922195335, 4.456573802948024, 2.6442660372556444, 3.7216852394828073 };
double[] POCKKZB_FGNQQA = { 8.38801852183473, 2.284191901516045, 5.084540489182378, 1.674058425502392, 6.582113966026355, 4.535954119796876, 9.655576838937206, 0.9057730473532776, 12.594924738730645, 7.746648086079376, 11.98098322298382, 3.255923593789993, 10.419132138693842 };
int[] BQ__Y_IAsVbM2emsVuNM_ = { 7, 3, 5, 1, 2, 6, 8, 12, 9, 0, 4, 11, 10 };
double[] jY__n3HVSq_WnFXQMnt = { 4.522937188633843, 7.63592787991592, 9.711938391204889, 12.329314329092874, 1.1257488711853099, 11.26843992090746, 0.20656899168837578, 8.596210417144972, 6.313987076769585, 2.726188726136701, 5.437577113574992, 10.94073555701292, 3.2325862076196463 };
int[] var_801 = { 6, 10, 4, 5, 0, 12, 3, 8, 7, 9, 1, 11, 2 };
double[] var_3117 = { 1.59679966392783E9, 5.09464, 1.7081, 1.59679967201455E9, 8221.83558, 0.6956, 81286.37426, 11.30573, 1.87014187726384E9, 0.0, 0.30216, 1.93861225375307E9, 1.61031449284985E9 };
double[] p_vc56jpND__QGGjzT4_Wo7 = { 1.8560312987803957, 2.4090487677657637, 0.8107141612789537 };
int[] CLOHOQ_TOCOXGBRWY_PVBHFAV = { 0, 2, 1 };
int[] g_hFqjbczKirudqjb = { 1, 0, 2 };
int[] A7c7WIo__fQMQjM_lR = { 1, 0, 2 };
int[] fKzmro = { 0, 1, 2 };
double[] pFlxasazuVysmwcpkfm = { 1.7137421654720035, 0.880784281506382, 2.044091478491187 };
double[] b_9rz1_gUCNc_ceKC = { 25.495116489488254, 65535.73197007176, 0.7422593232260603 };
int mZwtvvepUboureeved = (int) (-var_3117[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[4])])]])]] + Math.log(var_3117[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[11])])]])]]));
double kW2_ZQnBOs9VL_mjKXcB__4 = var_3117[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[6])])]])]];
double[] _KnlkZiv_t6Ohx_xWp_9M = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
mZwtvvepUboureeved = (int) (var_3117[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[8])])]])]] - Math.sinh(var_3117[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[2])])]])]]));
while (mZwtvvepUboureeved != (int) (var_3117[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[3])])]])]] + Math.sin(var_3117[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[9])])]])]]))) {
switch(mZwtvvepUboureeved) {
case 1678784867:
String var_1767 = "";
int[] _KhlYbJNlonwV_I_OOZKAb_ = { 0x0052, 0x0073, 0x005C, 0x0069, 0x005B, 0x005E, 0x006D, 0x005B, 0x001F, 0x0033, 0x0050, 0x0061, 0x0050, 0x005E, 0x006B, 0x0056, 0x004E, 0x004D, 0x001F, 0x003A, 0x001F, 0x001A, 0x0001, 0x0009, 0x0055 };
for (int x0Qc_6t8YSu__UjlP_hUC6M6 = (int) (b_9rz1_gUCNc_ceKC[(int) (pFlxasazuVysmwcpkfm[fKzmro[A7c7WIo__fQMQjM_lR[g_hFqjbczKirudqjb[CLOHOQ_TOCOXGBRWY_PVBHFAV[(int) (p_vc56jpND__QGGjzT4_Wo7[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[3])])]])]])]]]]])]), _bFfGZu_kuSY5dNkBN_ku_tU = (int) (b_9rz1_gUCNc_ceKC[(int) (pFlxasazuVysmwcpkfm[fKzmro[A7c7WIo__fQMQjM_lR[g_hFqjbczKirudqjb[CLOHOQ_TOCOXGBRWY_PVBHFAV[(int) (p_vc56jpND__QGGjzT4_Wo7[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[3])])]])]])]]]]])]); x0Qc_6t8YSu__UjlP_hUC6M6 < (int) (b_9rz1_gUCNc_ceKC[(int) (pFlxasazuVysmwcpkfm[fKzmro[A7c7WIo__fQMQjM_lR[g_hFqjbczKirudqjb[CLOHOQ_TOCOXGBRWY_PVBHFAV[(int) (p_vc56jpND__QGGjzT4_Wo7[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA[(int) (var_3643[9])])]])]])]]]]])]); x0Qc_6t8YSu__UjlP_hUC6M6++) {
_bFfGZu_kuSY5dNkBN_ku_tU = _KhlYbJNlonwV_I_OOZKAb_[x0Qc_6t8YSu__UjlP_hUC6M6];
_bFfGZu_kuSY5dNkBN_ku_tU ^= x0Qc_6t8YSu__UjlP_hUC6M6;
_bFfGZu_kuSY5dNkBN_ku_tU += x0Qc_6t8YSu__UjlP_hUC6M6;
_bFfGZu_kuSY5dNkBN_ku_tU++;
var_1767 += (char) (_bFfGZu_kuSY5dNkBN_ku_tU & (int) (b_9rz1_gUCNc_ceKC[(int) (pFlxasazuVysmwcpkfm[fKzmro[A7c7WIo__fQMQjM_lR[g_hFqjbczKirudqjb[CLOHOQ_TOCOXGBRWY_PVBHFAV[(int) (p_vc56jpND__QGGjzT4_Wo7[var_801[(int) (jY__n3HVSq_WnFXQMnt[BQ__Y_IAsVbM2emsVuNM_[(int) (POCKKZB_FGNQQA
