Create cd.java

It works! Shouldn't require additional editing.