I want to write assembly code using java Solution JVM\'s support diagnostic options that allows you to dump the actual Assembly that is generated by JVM for the specific runtime. to enable dumping Assembly, use following JVM options while running your program -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly The PrintAssembly option dumps the assembly code. Since it\'s an advanced diagnostic option, you need to use the -XX:+ UnlockDiagnosticVMOptions Hello World program public class HelloWorld { public static void main(String[] args) { System.out.println(\"Hello World !\"); } } Hello world program in Assembly java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly HelloWorld .