Transferring code to Java project