Made a java version of lockfile and seperated it out. Still WIP