Last updated by
4 years ago
Page: NetBeans Integration, Version:8
Here's how to get started with Grails in NetBeans IDE 6.5.





3. Create the Domain Class

- Prepare the Environment
- Read the Grails Quick Start, which presents the scenario that we will reproduce in the sections that follow.
- Download and install the "Web & Java EE" distribution of NetBeans IDE 6.5 Milestone 1 or later.
- Download and unzip Grails.
- In the IDE, go to the Options window and set the location of Grails in the "Groovy" panel. If you want to use Groovy, also set the location of Groovy there.
- Choose the Grails Application project in the New Project wizard (Ctrl-Shift-N):

- Click Next and type the name of the project:

- Click Finish and you should see this:

- Expand the folders and have a look around:

- Also look at the generated files and notice that many of them have default values filled in:

3. Create the Domain Class
- Right-click on the Domains classes node:

- Name the domain class "Book" and then fill in the following two lines within the generated class:
- You should now see this:

- Create some initial values in the Bootstrap.groovy class:
- Use Ctrl-Space to call up code completion and then have a look at the other ways of completing the statements above:
- You should now see this: