Chapter 2: Setup

The b4j\usr directory contains sample grammar and data files. You should create a folder named sample and put all this stuff in, to clean the place for your own project.

Game data

Copy the game data file to b4j\usr.

Setting up your project properties

Open the b4j\build.xml file and set the user properties, in the beginning. If you use the Notepad or an UTF-8 editor, you should change the first line to

<?xml version="1.0" encoding="UTF-8"?>
Cheat: HERE is the resulting build file.

Your first Schema

You can now generate your first schema using

ant createEmptySchema
from b4j dir. In usr dir, a GuessMeRight.xsd file was created, which is the one you will work on from now, with three other xml schema files you don't need to care too much about.

GuessMeRight.xsd is not a valid XML Schema file for now, but it will be at the end of next chapter.

Next

Go on to Chapter 3...
or back to Chapter 1.