下載了Hibernate3.1編譯,無論通過build.bat還是ant jar都會出錯。前者會說找不到javac,我暈倒。后者說antlr/Tool找不到。
后來在hibernate網站上(http://www.hibernate.org/6.html)看到:
Fixing Ant classpath/plugin issues
You may need to add junit.jar to your $ANT_HOME/lib directory if it is not there already, or alternatively remove the $ANT_HOME/lib/ant-junit.jar file. For Hibernate3, repeat the steps above, but also copy lib/antlr.jar or remove the $ANT_HOME/lib/ant-antlr.jar file.
These
steps are necessary because Ant ships with plugin stub libraries in its
classpath, so Ant plugins for JUnit or Antlr can't be used without
copying or removing files. If you don't have Ant installed on your
machine or don't want to mess with the default Ant installation then,
on Windows, just run build.bat to use the bundled Ant libraries.
雖然他說可以用build.bat來進行,但我也不知道他為什么會找不到javac,反正我把antlr.jar拷到ant的lib下面,就OK了。