Skip to content

Instantly share code, notes, and snippets.

@rabbitcount
rabbitcount / build-hsdis-macos.sh
Last active January 10, 2020 08:27
Java 10 HotSpot Disassembly on macOS Mojave
#!/bin/bash -e
# Download OpenJDK Reference Implementation Sources from
# http://jdk.java.net/java-se-ri/10
curl -O https://download.java.net/openjdk/jdk10/ri/openjdk-10_src.zip
# Navigate to the hsdis sources
unzip openjdk-10_src.zip
cd openjdk/src/utils/hsdis
@rabbitcount
rabbitcount / Test.java
Last active December 17, 2018 05:17
解密Java虚拟机 Ch2P48
public class Test {
public static void main(String[] args) {
add(5, 8);
}
public static int add(int a, int b) {
int c = a + b;
int d = c + 9;
return d;
}