Hey, Trying to do the following: #+HEADER: :classname se/my_test_package/Main #+HEADER: :dir src #+HEADER: :cmdline -classpath src:. #+BEGIN_SRC java :results output code package se.my_test_package; class Main { public static void main(String[] args) { System.out.println("Hey from Emacs Org mode!"); } } #+END_SRC I expected this to create Main.java and Main.class in directory src/se/my_test_package/ before running =javac=. Instead I get this: File is missing: "Opening output file", "No such file or directory" "/tmp/src/se/my-test-package/Main.java" In the patch I rearrange so package dirs are created before the Main.java file is written to file system. It fixes the provided case for me.