Command Line Java Compilation

1. Download and unzip the CommandLine Hummingbird package.

2. Using a terminal, navigate to the CommandLine directory. LINUX USERS ONLY: You will need to install libusb-1.0 before compiling a program. To do so, run sudo apt-get install libusb-1.0-0-dev in any terminal window.

3. Compile a file by using the following incantation, where is the name of the program to compile:

Windows: javac -classpath “.;../libs/*” com\birdbraintechnologies\ Code\

Mac/Linux: javac -classpath “.:../libs/*” com/birdbraintechnologies/ Code/

Try this with one of the three example programs before writing your own.

4. Run a file with the following incantation, where ProgramName is the program you want to run.

Windows: java -cp “.;..\libs\*;com\birdbraintechnologies\HummingbirdRobot” Code/ProgramName

Mac/Linux: java -cp “.:../libs/*” Code/ProgramName

Linux users may need to use sudo. If you don’t want to use sudo, run this script (credit: Justin Lee) or follow these instructions to make it so regular users can access the Finch (credit: Meg Richards). The instructions are for the Finch robot, but they apply equally to Hummingbird except that the VID/PID is 2534/2222 instead of 2534/1111.