![]() Rosetta 2Īfter I was done with my Java setup, I came to know that we can also install “Rosetta 2”. The solution is to find the ARM 64-bit architecture based build of the software and you should be fine. But, if you are here then it means you are facing this too. ![]() This was the first experience of “ Bad CPU type in executable” for me. OpenJDK Runtime Environment Zulu16.30+19-CA (build 16.0.1+9 ) I downloaded the tar file, extracted it and run the java command and it worked fine. ![]() After some searches, I landed on the Azul Zulu OpenJDK builds page and it had the ARM 64-bit architecture build. All I needed was to find an OpenJDK implementation that supports ARM64 architecture. java: Bad CPU type in executableĪfter the issue was identified, the solution was simple. After some online searches and debugging, I found that it’s happening because new MacBook M1 chip is using ARM64 architecture and OpenJDK binaries downloaded from the JDK site is built for 圆4 architecture, which is used by Intel processors. This was something new to me, I have worked on Java and Mac OS for so long and never saw this kind of error. So, I downloaded OpenJDK tar file, extracted it and tried to run “java -version” command and it threw the error: I got new MacBook Air M1 recently and first thing I wanted to install there was Java.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |