WIP
Only compile on linux and work with java6