Java/JDK for the Apple Silicon chips
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
With the introduction of Apple Silicon chips, specifically the M1, M1 Pro, and M1 Max processors, there has been a significant shift in the landscape of hardware used in Mac computers. This change from Intel's x86 architecture to Apple's own ARM-based architecture has significant implications for software development and execution, including the development and running of Java applications using the Java Development Kit (JDK).
Java on Apple Silicon
The transition to Apple Silicon has necessitated adaptations in many software technologies, Java included. The Java community, led by Oracle and other OpenJDK contributors, has moved swiftly to ensure full Java support on these new processors. This ensures that Java applications can run efficiently on the new Macs, leveraging the performance and efficiency improvements of Apple Silicon.
JDK Versions and Support
The OpenJDK community, along with Oracle, introduced support for Apple Silicon in JDK 16. However, the official support came a bit earlier from Azul Systems, which released Zulu builds of OpenJDK that can run on Apple Silicon. Following JDK 16, subsequent releases have also supported Apple Silicon, ensuring developers have the latest features and security updates.
Performance
Java applications benefit from the efficient performance of the Apple Silicon processors. The ARM architecture, which is known for its efficiency in power consumption and heat output, runs Java applications using JVM just as well—if not better—in many cases than they did on previous Intel architectures. This is particularly beneficial for applications that are resource-intensive.
Transition from Rosetta 2
Initially, Java programs on M1 Macs ran through Apple's Rosetta 2 translation layer, which allows apps built for Intel architecture to run on ARM-based chips. While functional, running Java through Rosetta 2 may not be as efficient as running it natively. With the native support in JDK 16 and later, Java applications can be executed directly on the hardware without this translation layer, enhancing performance and efficiency.
Developing Java on Apple Silicon
For Java developers using Apple Silicon Macs, several JDK distributions are available natively for ARM64 architecture. These include Oracle JDK, OpenJDK from various providers like AdoptOpenJDK (now Adoptium), and other distributions like Amazon Corretto. The availability of these native distributions means that developers can set up their development environments to take full advantage of Apple Silicon capabilities.
Technical Considerations
- Java Virtual Machine (JVM): The ARM64 architecture support in JVM means improved start-up times and better overall performance for Java applications.
- Concurrency and Multi-threading: Apple Silicon processors, with their high-efficiency cores and performance cores, offer significant advantages for multi-threading in Java applications, making them run faster and more efficiently.
- Tools and Libraries: Most popular Java tools and libraries are now compatible with ARM64 architecture, although it's always good to check compatibility for specific tools or libraries.
Here is a table summarizing the transition and support for Java on Apple Silicon:
| Feature | Description |
| Native JDK Support | JDK 16 and later versions natively support Apple Silicon. |
| Early JDK Versions | Zulu OpenJDK provided early builds for Apple Silicon. |
| Performance | Native support on ARM architecture offers improved performance and efficiency over running under Rosetta 2. |
| Development Tools | Most Java IDEs and development tools such as IntelliJ IDEA, Eclipse, and NetBeans are updated to run on Apple Silicon. |
| Libraries and Frameworks | Ongoing updates ensure that major Java libraries and frameworks are compatible with ARM64 architecture. |
Conclusion
The shift to Apple Silicon is a significant marker in the evolution of hardware platforms suitable for Java development. With full-fledged support from JDK 16 onwards, Java developers can now fully exploit the capabilities of Apple Silicon, enhancing both the performance and efficiency of Java applications. As the ecosystem around ARM64 grows, further optimizations and improvements are expected, which will continually enhance Java development on these modern hardware platforms.
Related reading
- java.lang.ClassCastException class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader ''bootstrap
- java.lang.ClassCastExceptionxx cannot be cast to org.apache.avro.generic.IndexedRecord
- java.lang.ClassNotFoundException com.fasterxml.jackson.databind.ser.FilterProvider when flink boot up
- java.lang.ClassNotFoundException com.fasterxml.jackson.databind.ser.FilterProvider when flink boot up
- java.lang.ClassNotFoundException Didn't find class on path dexpathlist
- java.lang.ClassNotFoundException Didn't find class on path dexpathlist
- java.lang.ClassNotFoundException io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe
- java.lang.ClassNotFoundException org.apache.kafka.clients.consumer.ConsumerGroupMetadata

OOD Fundamentals
Master object-oriented design from first principles, SOLID, design patterns, and classic interview problems with hands-on coding.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.