Intro News Download Documentation Links

Compile and run BT-Sim

Requirements

You need a Java Development Kit (JDK) compatible with Java 2. I use j2se 1.4.2.

I recommend also that you get ant as it facilitates the build process.

Compile

To compile with ant, simply type the command

ant compile

If you really want to compile the program without using ant, you can do so by using a command similar to:

find src -name "*.java" -exec javac -deprecation -d build/classes {} \;

Run

You can start the program either using ant:

ant run
or using the command-line (for instance to pass arguments):
java -cp build/classes net.sf.btsim.BTSim

The program will (by default) listen on port 7007. So make sure that whatever program you want to use with this BlueTooth simulator it will try to connect to this port. With PalmSource's Palm OS Simulator, you need to specify something like 'localhost:7007' as the craddle's port.

Creating a jar file

If you're using ant, creating a jar file is easy:

ant jar

The file will be placed in the build/lib directory. This is an executable jar file. This means that it knows about the project's main class and can be executed with a command similar to this:

java -jar btsim-0.3.jar

On Windows one might be able to start it by double-clicking on the icon.

Creating the documentation

If you are using ant, you can generate the class documentation with this command:

ant javadoc

The documentation will be a series of HTML files in the usual javadoc format. You can find them in the build/doc directory.