How do i compile weka

You can compile the source code simply with any (Sun-compliant) java compiler, or use ant, or an IDE. Check out the article about Compiling WEKA, which contains links to further articles, covering topics about ant and IDEs.