<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mac on</title><link>https://dengwu.wang/cn/categories/mac/</link><description>Recent content in Mac on</description><generator>Hugo -- gohugo.io</generator><lastBuildDate>Wed, 29 Mar 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://dengwu.wang/cn/categories/mac/index.xml" rel="self" type="application/rss+xml"/><item><title>迁移M1遇到的问题总结</title><link>https://dengwu.wang/cn/blog/%E8%BF%81%E7%A7%BBm1%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93/</link><pubDate>Wed, 29 Mar 2023 00:00:00 +0000</pubDate><guid>https://dengwu.wang/cn/blog/%E8%BF%81%E7%A7%BBm1%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93/</guid><description>背景 # 之前使用的是20款的13寸Mac book Pro，CPU是Intel的i5，四核，16G，日常工作使用勉强够用。
但是遇到需要编译大型项目或者多开工程的时候，就有点吃不消了，风扇呼呼转，而且内存比较小，本人重度依赖docker，当需要虚拟化时也会比较吃力。
今年苹果更新了M2系统，对应的M1就开始降价，已有笔记本也使用了3年，趁着老笔记本还有价值的时候，入手了14寸Mac book Pro。
CPU选的M1 Pro 10核，32G内存，现在基本迁移完毕，只能说真香，不仅性能够用，而且一些在iPhone和iPad上跑的app现在也可以在笔记本上跑了。
迁移过程中遇到的问题 # Mac新系统必装套餐：Brew，oh-my-zsh，iTerm，有了这三件套，就可以装剩下的需要的东西了。
虽然通过brew可以安装大部分软件，但是也遇到了一些问题，
M1架构的JDK8 JDK各版本切换 ssh密钥 各种密码 JDK8 # 虽然JDK长期维护版已经到17了，但是大家都还在使用JDK8，&amp;ldquo;你发任你发，我用Java8&amp;rdquo;。
M1系列的就遇到了比较尴尬的问题，由于M1架构比较新，OpenJdk已经没有对应的M1版本可用，好在azul提供了支持，下载地址为:m1-jdk-8-zulu
openjdk version &amp;quot;1.8.0_362&amp;quot; OpenJDK Runtime Environment (Zulu 8.68.0.21-CA-macos-aarch64) (build 1.8.0_362-b09) OpenJDK 64-Bit Server VM (Zulu 8.68.0.21-CA-macos-aarch64) (build 25.362-b09, mixed mode) JDK各版本切换 # 解决了M1的JDK8的问题，其余11和17直接使用brew即可安装，但是版本切换很不方便，这个时候可以使用jenv来解决。
jenv 0.5.6 Usage: jenv &amp;lt;command&amp;gt; [&amp;lt;args&amp;gt;] Some useful jenv commands are: commands List all available jenv commands local Set or show the local application-specific Java version global Set or show the global Java version shell Set or show the shell-specific Java version rehash Rehash jenv shims (run this after installing executables) version Show the current Java version and its origin versions List all Java versions available to jenv which Display the full path to an executable whence List all Java versions that contain the given executable add Add JDK into jenv.</description></item></channel></rss>