One would guess that e.getKeyCode() is returning a value greater than private boolean[] keys = new boolean[120]; in keyPressed or keyReleased. As the says: 'WARNING: Aside from those keys that are defined by the Java language (VK ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK constants. Sun reserves the right to change these values as needed to accommodate a wider range of keyboards in the future. An unspecified behavior will be caused if the id parameter of any particular KeyEvent instance is not in the range from KEY_FIRST to KEY_LAST.'

Why this would change in Sierra is something I leave as an exercise; maybe something about the way it inspects/reports keyboard characteristics? I am having this same problem. While developing my own java game in ElCapitan I had no issue with the key listener system. After updating to Sierra I am able to run my game without issue UNTILL I press more than one button on the keyboard at once, I however often press W(jump) while moving left(A) or right(D) and after this additional key event registers my entire keyboard stops being detected by the key listener. I have no idea why this is happening, I am using Sierra 10.12.1 and Java 1.8.0_20 Any help to how to fix this problem or any Input on how to solve the issue would be great.

Best firewall for mac. Download Java for OS X 2017-001 Java for macOS 2017-001 installs the legacy Java 6 runtime for macOS 10.13 High Sierra, macOS 10.12 Sierra, macOS 10.11 El Capitan, macOS 10.10 Yosemite, macOS 10.9 Mavericks, macOS 10.8 Mountain Lion, and macOS 10.7 Lion. Oct 3, 2015 - Java for OS X 2015-001 installs the legacy Java 6 runtime for OS X 10.11 El Capitan. I want to install DrJava and it seems to need this. I have OS Sierra and that is why I am getting the legacy Java SE6 runtime window.