Running the tool in Hibernate by R4R Team

The SchemaExport tool writes a DDL script to standard out and/or executes the DDL statements. The following table displays the SchemaExport command line options. java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaExport options mapping_files

In the Below Table SchemaExport Command Line Options are given:




do not output the script to stdout


only drop the tables


only create the tables


do not export to the database


output the ddl script to a file


select a NamingStrategy


read Hibernate configuration from an XML file

read database properties from a file


format the generated SQL nicely in the script


set an end of line delimiter for the script

Here in the Hibernate we can even embed SchemaExport in your application:

Configuration cfg = ....;
new SchemaExport(cfg).create(false, true);
Leave a Comment:
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!