Modernise Charles with a refreshing Flat look-and-feel!
You only need this Java Agent loader for Windows. See my blog post about Restyling Charles for details.
- Install a full copy of JDK 11, for instance Adoptium JDK 11. Embedded JDK is missing some modules.
- Remember the path you've installed to. The default should be:
C:\Program Files\Eclipse Adoptium\jdk-11.0.15.10-hotspot\
- Download the latest release of CharlesFlatLAF or compile your own, place it under
<Charles>/lib
; - Update
Charles.ini
:- Make a backup.
- Insert the following line after
classpath.1
:
classpath.2=lib/charles_flatlaf-1.0-SNAPSHOT-jar-with-dependencies.jar
- Replace the line with
main.class
to:
main.class=uk.jixun.charles.theme.Main
- Insert the following line after
vmarg.4
:
vmarg.5=-javaagent=lib/charles_flatlaf-1.0-SNAPSHOT-jar-with-dependencies.jar
- Replace the line with
vm.location
to:
vm.location=<JDK path>\bin\server\jvm.dll
给 Charles 套上一套全新的扁平化主题,重获新生!
注意:目前只有 Windows 系统需要使用 Java Agent 的方式来防止软件修改回系统默认的主题。 参见我在博客上发表的在 Charles 应用该主题的说明。
- 下载一份完整版的 JDK,例如 Adoptium JDK 11。这是因为 Charles 自带的 JDK 缺了点东西…
- 记住他的路径,默认应该是
C:\Program Files\Eclipse Adoptium\jdk-11.0.15.10-hotspot\
- 下载最新的 CharlesFlatLAF 或自己编译一份,放入
Charles.jar
所在的目录,即Charles
安装目录下的lib
目录; - 修改配置文件
Charles.ini
:- 首先备份一份该文件,若是改坏了至少还能还原;
- 在
classpath.1
下方添加一行:
classpath.2=lib/charles_flatlaf-1.0-SNAPSHOT-jar-with-dependencies.jar
- 将
main.class
行替换为:
main.class=uk.jixun.charles.theme.Main
- 在
vmarg.4
下方添加一行:
vmarg.5=-javaagent=lib/charles_flatlaf-1.0-SNAPSHOT-jar-with-dependencies.jar
- 将
vm.location
行替换为:
vm.location=<JDK 安装目录>\bin\server\jvm.dll