The alpha testing is currently using Eclipse Kepler with the Java 8 SE embedded JRE on the roboRIO. Not being a java expert, I’m not sure what additional java 8 support Eclipse Luna supports, or what the plans would be to support which version for FRC.
enums are the thing I miss most that is not included in Java ME
Thanks Ian for the video! I’ve linked from the slideshare site to the video. Youtube says I can’t add a comment for 20 minutes because it is doing maintenance to my account. I’ll add the link in that direction when it finishes.
Eclipse Kepler supports Java 7 syntax. You can use Java 8 libraries with Kepler. What you can’t use is new Java 8 syntax. Which is just functional programming/lambdas. I wouldn’t expect that to come during alpha or beta testing anyway. Largely because FIRST said they want to preserve as much backward compatibility to the APIs as they can next year. Which implies they aren’t changing them to use functional programming APIs! I could see it coming up if a team is writing a complex algorithm and wants to call some built in APIs for that.
Professionally, I’m excited about functional programming. For FRC, I’m much more excited about Java SE and various features added in Java 5 and 7. That and the fact that we aren’t using NetBeans next year!
Some of the stuff that is recommended I would argue is generally discouraged in terms of common practice (Though Common Practice does tend to fall away in the rush of programming between matches) but I think this is a good overview.
Also quick note, Eclipse Kepler CAN support Java 8 syntax, although you have to search for it in the Eclipse Marketplace and it works only after a certain build so either way I would recommend updating to Eclipse Luna.
Although WPILib wont be refactored and updated to Java 1.8 for the 2015 season I think this is a great move up. I sorely miss Enum’s, Generics and all the IO and NIO utilities (Also all the missing Collections!) I have come to love. Plus that means I can port some of my libraries more easily to FRC Code now! Networking will come back to being easier to implement and maintain and all the 1.7 Libraries will be opened, always a plus. Something I am curious about is if JNI will work with the cRIO and using the JNIGen library will make it easier to test allowing for some time and memory consuming processes to be shared between Java and Native Memory.
Still, could Reflection become a problem? I mean altering internal variable at will seems like it could result in unexpected behavior, even as to unexpected behavior returning to the FMS. Of course I am sure it is just common sense to not mess around too much with the WPILib Internal Variables. Just putting it out there.