aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Using ant create-tables in NetBeans 5.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Using ant create-tables in NetBeans 5.5" Watch "Using ant create-tables in NetBeans 5.5" New topic
Author

Using ant create-tables in NetBeans 5.5

Jay Dilla
Ranch Hand

Joined: Aug 12, 2004
Posts: 199
I'm folloing the Java J2ee tutorial and it's instructing me to use ant create-tables to populate the sample tables.

Here is the instructions off the Sun site:
http://java.sun.com/javaee/5/docs/tutorial/doc/WebApp6.html#wp69868


When you deploy any of the Duke's Bookstore applications using ant deploy, the database is automatically populated at the same time. If you want to populate the database separately from the deploy task or are using NetBeans 5.5 to deploy the application, follow these steps:

In a terminal window, go to the books directory or any one of the bookstore1 through bookstore6 example directories.
Start the Java DB database server. For instructions, see Starting and Stopping the Java DB Database Server. You don't have to do this if you are using NetBeans 5.5. It starts the database server automatically.
Run ant create-tables. This task runs a command to read the file tutorial.sql and execute the SQL commands contained in the file.
At the end of the processing, you should see the following output:
...
[sql] 181 of 181 SQL statements executed successfully

When you are running create-tables, don't worry if you see a message that an SQL statement failed. This usually happens the first time you run the command because it always tries to delete an existing database table first before it creates a new one. The first time through, there is no table yet, of course.






Where am I typing this "ant create-tables" command?
I went into the runtime window and right clicked a database and selected execute command. Then the SQL window opened up and I put ant create tables in there and it didn't work.
The tables are already created somewhere , it's a sample, but I don't know how to populate them and the instructions aren't making sense and aren't telling me WHERE i type the ant command!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using ant create-tables in NetBeans 5.5
 
Similar Threads
Using ant create-tables in NetBeans 5.5
How to use Derby DB in J2EESDK ?
Java EE5 Tutorial - 'ant create-tables' BUILD FAILED
Netbeans Problem , trying to follow J2ee Tutorial Online, Please I really need help
Ant task