简体   繁体   English

如何防止GWT混淆代码/在哪里可以找到GWT编译器

[英]How to prevent GWT from obfuscating code/Where to find the GWT Compiler

I am currently working to find a bug in my code, and upon inspecting element on my browser (FF and GC), I found that the java source code is obfuscated by GWT in order to increase parse speed. 我目前正在寻找代码中的错误,并且在检查浏览器(FF和GC)上的元素时,我发现Java源代码已被GWT混淆,以提高解析速度。 From researching online, i found that: 通过在线研究,我发现:

If you prefer not to have GWT obfuscate its output, then you can use the -style flag on the GWT Compiler. 如果您不想让GWT混淆其输出,则可以在GWT编译器上使用-style标志。 This flag has one of three possible values: 该标志具有三个可能值之一:

OBF (for obfuscated), the default OBF(用于混淆),默认
PRETTY, which makes the output readable to a human PRETTY,使输出对人类可读
DETAILED, which improves on PRETTY with even more detail (such as very verbose variable names) 详细,对PRETTY进行了更详细的改进(例如非常冗长的变量名)

I am wondering where I can find the GWT compiler. 我想知道在哪里可以找到GWT编译器。

There is no standalone compiler executable for GWT, it comes as part of GWT SDK. GWT没有独立的编译器可执行文件,它是GWT SDK的一部分。 Download the GWT SDK and from within the SDK dir you can invoke GWT compiler. 下载GWT SDK,然后从SDK目录中调用GWT编译器。

Check this link - http://www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions 检查此链接-http: //www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions

I have highlighted the style option. 我已突出显示样式选项。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM