Replace jdk with mermaid build scripts.