jhoja

The Java disassembler for Jasmin, Decompile protection tool for JD

Japanese(日本語)

Last update 24 Mar 2018
What is the jhoja
jhoja is a disassembler of Java class file.
Convert Java class file to Jasmin assembler code.
jhoja can insert decompile protection code.(-g option)
command line tool.
does not have GUI.
SWAG javap2 Ver 1.02 based.
forked from SWAG javap2. http://www.swag.uwaterloo.ca/javap2/

Important problems
Re-assemble support Ascii code sources only.
(without comments.)
not support other character codes.
jhoja support output UTF-8 strings.
but Jasmin does not support UTF-8.
if convert UTF-8 source to your local character code, may work on your locale systems.
but it will be lost cross platforms.
Decompile protection function support JD-GUI Decompiler.
but does not support Jad Decompiler.

Download
Download jhoja Ver 1.01 for Windows. (including source patch.)
Download from GitHub. (including patched source.)

What is the difference between jhoja and javap,SWAG javap2?
jhoja support Jasmin assembler code.
and jhoja support decompile protection function.
Oracle javap and SWAG javap2 does not support them.
jhoja output UTF-8 code.
javap2 does not support UTF-8.

Decompile protection function
Decompile protection function support JD-GUI Decompiler.
but does not support Jad Decompiler.
Decompile protection function does not affect the speed.
but larger than normal class file.
because insert protection code.
require Jasmin(Java assembler) and JRE or JDK.
not hard protection.
if use jhoja and Jasmin then easily crack decompile protection.

Examples: Decompile jhoja decompile protection class file by JD-GUI Decompiler.
Decompile jhoja decompile protection file by JD-GUI
Decompile jhoja decompile protection file by JD-GUI

Debug information
You can read any debug information in source comments.
but re-assemble will be lost debug information in class file.

Support OS
Binary file support Microsoft Windows.
Compiled by C++ Builder XE8.
Written by C++. but allmost C.
if recompile may work on other OS.
jhoja for Windows work on GNU/Linux for Intel/AMD CPU with wine.

Binary License
Apache v2 license
(follow the SWAG's license.)

jhoja ver 1.01 Source patch License
Apache v2 license
(follow the SWAG's license.)
chenged 2-clause BSD license to Apache v2 licence.
(C) Masaki Oba
admin@nabeta.tk
http://www.nabeta.tk

Example A part of disassemble code
.field hizuke_str Ljava/lang/String;
.field moto_gatsu I
.field moto_nen I
.field static properties Ljava/util/Properties;
.field static menubarheight I

.method private static resizeframe(II)V

    .limit stack 6
    .limit locals 20

    getstatic asucalendar/menubarheight I
    istore 18
    iload_0
    iconst_2
    iadd
    istore 16
    iload_0
    iload_1
    if_icmple Z18
    iload_1
    istore 16
    ;.line 101
Z18:
    iload 16
    i2f
    f2d
    ldc2_w 0.200000
    dmul
    d2i
    istore 17
    iload 17
    bipush 40
    if_icmplt Z43
    iload_0
    sipush 300
    if_icmpge Z47
    ;.line 103
Z43:
    bipush 40
    istore 17
    ;.line 106
Z47:
    getstatic asucalendar/bbb Ljavax/swing/JPanel;
    iconst_0
    iload 18
    iload_0
    iconst_1
    isub
    iload 17
    iload 18
    iadd
    iconst_1
    isub
    invokevirtual javax/swing/JPanel/setBounds(IIII)V
    getstatic asucalendar/tugi Ljavax/swing/JButton;
    iload_0
    iconst_1
    isub
    bipush 65
    isub
    iconst_1
    bipush 30
    bipush 19
    invokevirtual javax/swing/JButton/setBounds(IIII)V
    getstatic asucalendar/tugi_nen Ljavax/swing/JButton;
    iload_0
    iconst_1
    isub
    bipush 30
    isub
    iconst_1
    bipush 30
    bipush 19
    invokevirtual javax/swing/JButton/setBounds(IIII)V
    getstatic asucalendar/lb Ljavax/swing/JLabel;
    iconst_1
    bipush 12
    iload_0
    iconst_1
    isub
    iload 17
    iconst_1
    isub
    invokevirtual javax/swing/JLabel/setBounds(IIII)V
    getstatic asucalendar/dp Ljavax/swing/JPanel;
    iconst_0
    iload 18
    iload 17
    iadd
    iload_0
    iconst_1
    iadd
    iload_1
    iload 18
    isub
    iload 17
    isub
    iconst_1
    iadd
    invokevirtual javax/swing/JPanel/setBounds(IIII)V
    iload 17
    bipush 40
    if_icmpgt Z164
    iload 17
    bipush 20
    isub
    i2f
    f2d
    ldc2_w 0.700000
    dmul
    d2i
    istore 10
    goto Z178
    ;.line 115
Z164:
    iload 17
    bipush 20
    isub
    i2f
    f2d
    ldc2_w 0.600000
    dmul

Usage
Usage: jhoja [-g] [-h] xxx.class > xxx.j
-g: Insert decompile protection code.
-h: show help.

Examples:
jhoja -g xxx.class > xxx.j
jhoja xxx.class > xxx.j
jhoja xxx.class | more

Examples with Jasmin
does not Insert discompile protection code.
jhoja xxx.class > xxx.j
java -jar jasmin.jar xxx.j

Insert discompile protection code.
jhoja -g xxx.class > xxx.j
java -jar jasmin.jar xxx.j

Example Decompile protection batch file for All class files
Windows batch file.
require Jasmin(Java assembler) and JRE or JDK.
C:\>zenbu *.class

zenbu.bat
@echo off
for %%f in (%*) do (
jhoja -g %%f > %%f.j
java -jar jasmin.jar %%f.j
)

History
12 Mar 2018 jhoja for Windows Ver 1.0 (binary and source patch)
13 Mar 2018 fixed a HTML file in ZIP file
14 Mar 2018 fixed HTML files in ZIP file
24 Mar 2018 ver 1.01

Link
SWAG Javap2
JASMIN HOME PAGE


Online Dictionary site
Online NabetaJisho

Online Dictionary Quiz site
Online NabetaJisho Quiz

More information
NabetaJisho Japanese site

Mail
admin@nabeta.tk

NabetaJisho Homepage