jd-gui-1.6.6 乱码问题整理(about jd-gui-1.6.6 garbled code.)
文章最后有最终版本下载。
前言,
之前一直使用老版本的jd-gui,最近想看看有没有更新,结果发现还真更新了。在github上找到了源码。
git地址:https://github.com/java-decompiler/jd-gui。
在window环境下使用中遇到了乱码问题。特此整理记录。
问题有两个:
一、从反编译代码的界面CTRL+C复制是如果选中内容包含中文,贴到其他编辑器时,中文丢失。
二、打开xml文件、properties文件等包含中文时。中文在反编译界面中显示乱码。用其他工具打开正常。
正文,
gradle 的使用不做讲解,请自行学习。
问题一:
更新插件即可,需要重新编译源码。
compile 'com.fifesoft:rsyntaxtextarea:3.0.4'升级到compile 'com.fifesoft:rsyntaxtextarea:3.1.1'。据说升级到3.0.5就解决此问题了。
问题二:
1.使用jd-gui-1.6.6.jar 反编译时出现乱码。增加运行参数。
1 | java -D 'file.encoding' =utf- 8 -jar .\jd-gui- 1.6 . 6 .jar |
2.使用jd-gui.exe出现乱码的。可以曲线救国。简单修改源码重新编译生成exe文件。原理也和使用jar包时加入运行参数一样。
打开源码中的/jd-gui/build.gradle文件增加红色部分。重新打包发布gradle build。
1 2 3 4 5 6 7 8 9 10 11 12 13 | // Java executable wrapper for Windows // launch4j { createExe.dependsOn 'proguard' jvmOptions = [ '-Dfile.encoding=utf-8' ] //这行是新增的 version = textVersion = project.version fileDescription = productName = 'JD-GUI' errTitle 'JD-GUI Windows Wrapper' copyright 'JD-GUI (C) 2008-2019 Emmanuel Dupuy' icon projectDir.path + '/src/launch4j/resources/images/jd-gui.ico' jar projectDir.path + '/' + proguard.outJarFiles[ 0 ] bundledJrePath = '%JAVA_HOME%' } |
下载链接
链接:https://pan.baidu.com/s/1Z1dM6Te0yAZHkl3E3Nx32A
提取码:fzjs
中文 ↑
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
English ↓
Bottom Download.
Introduction,
I used to use the old version of JD GUI. I found the source code on GitHub.
git address:https://github.com/java-decompiler/jd-gui.
In the windows environment, we encounter the problem of garbled code.
There are two questions:
Q1.[Bug] Can not copy-pasted Non-ASCII characters #268 #303 https://github.com/java-decompiler/jd-gui/issues/268,https://github.com/bobbylight/RSyntaxTextArea/pull/303
Q2.In windows, the default JD GUI is GBK encoding https://github.com/java-decompiler/jd-gui/issues/129
Main Body,
how to use gradle ? → https://gradle.org/
Q1:
update rsyntaxtextarea and rebuild source。
update compile 'com.fifesoft:rsyntaxtextarea:3.0.4' to compile 'com.fifesoft:rsyntaxtextarea:3.0.5' or higher version and i used 3.1.1。
Q2:
1.use jd-gui-1.6.6.jar please add jvm args like this
1 | java -D 'file.encoding' =utf- 8 -jar .\jd-gui- 1.6 . 6 .jar |
2.use jd-gui.exe update /jd-gui/build.gradle, and rebuild . it work likes 1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | // Java executable wrapper for Windows // launch4j { createExe.dependsOn 'proguard' jvmOptions = [ '-Dfile.encoding=utf-8' ] //new row version = textVersion = project.version fileDescription = productName = 'JD-GUI' errTitle 'JD-GUI Windows Wrapper' copyright 'JD-GUI (C) 2008-2019 Emmanuel Dupuy' icon projectDir.path + '/src/launch4j/resources/images/jd-gui.ico' jar projectDir.path + '/' + proguard.outJarFiles[ 0 ] bundledJrePath = '%JAVA_HOME%' } |
Download
address:https://pan.baidu.com/s/1Z1dM6Te0yAZHkl3E3Nx32A
passwd:fzjs
if can't download ,email me.
baishier.g@gmail.com
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律