Java编译器自动重命名参数(混淆) [英] Java compiler automatically renaming parameters (obfuscating)

查看:474
本文介绍了Java编译器自动重命名参数(混淆)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编写我编写的代码,然后看看在aa JD gui,方法显示标题如下:

When I compile the code I am writing, then look at in a a JD Gui, methods show up with headers such as the following:

public void growSurface(Random paramRandom, int paramInt1, int paramInt2){

通过.bat文件。是否有一种方法来指定我不想模糊的代码。

I am compiling through a .bat file. Is there a way to specify that I don't want to obfuscate the code.

推荐答案

默认情况下 javac 不包括生成的 class 文件中的调试信息。该信息例如是。方法参数名称(但方法和字段名称始终存储以允许反射)。当参数名称不知道时,JD-GUI和其他反编译器正在组成一些合理的名称。

By default javac is not including debug information in generated class files. This information is e.g. method parameter names (but method and field names are always stored to allow reflection). When the parameter names are not known, JD-GUI and other decompilers are making up some reasonable names. They are not obfuscated - simply they aren't there.

使用 -g 标志编译您的代码:

Compile your code with -g flag:

javac -g SomeClass.java

刚刚检查JD-GUI - 它显示正确的参数名称。

Just checked JD-GUI - it shows correct parameter names then.

这篇关于Java编译器自动重命名参数(混淆)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆