intoolswetrust / jd-cli

Command line Java Decompiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decompiling *.class leads to losing the package name

ildar-shaimordanov opened this issue · comments

I am not so familiar with java to distinguish if the issue has to do with the tool or the JD-CORE. Please review and advice.

C:\Temp>jd-cli -v
jd-cli version 1.1.0.Final - Copyright (C) 2015 Josef Cacek

There is simple example:

package myPackage;

class MyClass {
}

JD-CLI results to (no package):

C:\Temp>jd-cli -g OFF MyClass.class
class MyClass {}

The well-known and old-fashion JAD results to (package name is in place):

C:\Temp>jad -p MyClass.class
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name:   MyClass.java

package myPackage;


class MyClass
{

    MyClass()
    {
    }
}