1, modify eclipse.app/contents/info.plist, find
<key>CFBundleExecutable<key>
Add the following code above it
<?xml version= "1.0" encoding= "UTF-8"?> <! DOCTYPE plist Public "-//apple//dtd plist 1.0//en" "Http://www.apple.com/DTDs/PropertyList-1.0.dtd" > < Plist version= "1.0" > <dict> <key>LSEnvironment</key> <dict> <key >JAVA_TOOL_OPTIONS</key> <string>-Dfile.encoding=UTF-8</string> <key>lang </key> <STRING>ZH_CN. utf-8</string> </dict> <key>CFBundleExecutable<key>
2, modify eclipse.app/contents/macos/eclipse.ini, add-dfile.encoding=utf-8 in the last line
3. Close eclipse, restart, and exit
4. Open the command terminal and execute the following command
/system/library/frameworks/coreservices.framework/frameworks/launchservices.framework/support/lsregister-v-F/ Applications/eclipse/eclipse.app
5 Restarting Eclipse
Solution-in Mac systems, Eclipse cannot import projects with Chinese paths