Compiling and Running a Hummingbird Java Program

Approx. Time: 
10
  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 ProgramName.java is the name of the program to compile: Windows: javac -classpath ;libs/hummingbird.jar ProgramName.java Mac/Linux: javac -classpath :libs/hummingbird.jar ProgramName.java 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/hummingbird.jar; PROGRAMNAME Mac/Linux: java -cp libs/hummingbird.jar: PROGRAMNAME

Note that in Linux you may need to either run java with sudo, or change the Hummingbird's default udev rules as per these instructions. 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.