This is an old game I wrote when I started learning Java. You play a mine worker and try to collect as many copper stars without getting hit by one of the black boxes.
You can move with the arrow keys.
You can just run this Java archive. The source files are included in it.