I. Install jdk
1. Address:/cn/java/technologies/downloads/#java11, download and double-click install
2. Check the installation address of java, in the macOS terminal enter/usr/libexec/java_home
The terminal will show you the path where Java is installed. This path is usually "/Library/Java/JavaVirtualMachines/" followed by the version number of Java.
3. Configure java environment variables
3.1 Checking the type of shell used on a mac system
Different types of shells use different configuration files, you can use `echo $SHELL` to check the type of shell on your computer
3.2 Depending on the shell, create a configuration file in the user's home directory, cd /home commandvim ~/.zshrc
, go to file
3.3 Adding Java Environment Variables
Setting JAVA_HOMEexport JAVA_HOME=/Library/Java/JavaVirtualMachines//Contents/Home
Update the PATH environment variable, add JAVA_HOME/binexport PATH=$JAVA_HOME/bin:$PATH
3.4 Check if the java environment is configured successfullyjava -version
The version number appears to indicate that the installation has been successful.
II. Install Charles
1. Official website address:/download/
2. Download and install and activate, activation address:/mytools/charles/
Add the account number and generated password to [help]--Register Charles, restart Charles after adding them.
Panel Introduction
III. Grabbing PC request configuration
1. First install the certificate (loaded on the certificate before you can capture https requests), proxy ---->SSL Proxying---->Install charles root certificate
2. Open the keychain access, find the installed certificate, open the display profile, in the [trust] - [when using the certificate] select always trust
Set SSL Proxy setting, check [Enable SSL Proxying], click OK.
If you use the PC side and Charles client on the same computer, you can configure the proxy through a quick configuration method: directly in the Proxy ----> select [macos Proxy]