1. 用過最好用的還是MyEclipse附帶的工具…
2. 官方的hibernate tools
Hibernate Tools for Eclipse插件的安裝和使用【轉】
Hibernate Tools For Eclipse and Ant
jboss
http://www.jboss.org/tools/download.html
到這裡用update的
http://www.jboss.org/tools/download/installation/update_3_3.html
選取Hibernate Tools,應該不用全裝(吧)
下面是gen出pojo的步驟
How to Generate Hibernate Pojo Classes from DB Tables
官方的教學
http://docs.jboss.org/tools/2.1.0.Beta1/hibernatetools/html_single/
3.
http://hibernatepojoge.sourceforge.net/
這得編輯一個設定檔 like
<?xml version="1.0" encoding="ISO-8859-1" ?> <appconfig> <dbType>MYSQL</dbType> <driver>com.mysql.jdbc.Driver</driver> <jdbcConnectionString>jdbc:mysql://127.0.0.1/hbnPojoTest</jdbcConnectionString> <databaseIP>localhost</databaseIP> <databaseCatalog>someDBName</databaseCatalog> <databaseUsername>root</databaseUsername> <databasePassword>abcdefgh</databasePassword> <sourceTarget>D:/Workspace/yourProject</sourceTarget> <projectName>yourProjectName</projectName> <topLevel>com.yourcompany</topLevel> <libPath>libs</libPath> <schemaStrategy>PARTIAL</schemaStrategy> </appconfig>
再使用指令
java -jar hbnPojoGen.jar config.xml