That's a Java ME class, and I expect you're running Java SE aren't you? There's no reason that I'm aware of to run the micro-edition on hardware like the BBB, it's easily got enough grunt to run the full JVM.
I'm accessing GPIO, I2C, SPI from J2SE using JNA (
https://github.com/twall/jna) which is working very well - it's a wrapper around libc, much easier to work with than JNI, and because it's just libc wrapped in Java you can do anything you can do in C - in particular, you can poll() on filehandles, which means you can use the GPIOs through the /sys/class/gpio interface.
To preempt the next question, I've extracted a bit of code and put it as a shar archive at
http://pastebin.com/af3CRU5r. Download the raw content to a shell script and run it, it will give you 5 Java source files. Compile them with the "jna.jar" file from ther JNA project mentioned above. This is an extract from a project I'm working on so in order to use it you'd need to fill in a couple of blanks, namely the events that are being fired when the GPIO changes value: search for "pubGPIO" to see where that happens. I'm also using the GPIO overlays from
https://github.com/nomel/beaglebone to set pull-ups/pulldowns, although this isn't essential to the classes. The I2C stuff is there for good measure but is also independent. And if you want to do things completely differently, the POSIX.java file is my way into libc via JNA, and doesn't depend on anything else.