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!!!