I haven't done much Java development in about six years or so. I may have the need soon to port a C# application to Java so a开发者_高级运维s to make it run on both Windows and the company standard flavor of Linux (for reasons I can't discuss). The thing I want to know is, what is the best reading material to brush up on changes to Java since then, so I can make the port as smooth as possible.
I'm currently running on the .NET Framework 3.5 and making use of lambdas, extension methods and LINQ. This is a client side application with no web service calls or database calls. I do use various network protocols to talk to other machines, but I am already researching components to replace the ones we're using now (Dart Telnet, SharpSSH, etc.)
Mostly I'm looking for what has changed in the Java language and BCL since then. I don't recall generics, foreach
loops, and boxing and unboxing was a PITA. Is there any equivalent for extension methods, lambdas and LINQ?
Effective Java, Second Edition is probably the starting text. It discusses the new language features and best practices for using them. Some of the stuff is probably familiar, but after six years, a refresher isn't a bad idea.
The various Sun tutorials on the new features are also a good start for the new features.
Effective Java and Java in a Nutshell.
Effective Java to get you thinking in Java and Nutshell as your reference guide.
To answer your final question, there are no equivalents for extension methods, lambdas or LINQ.
Java language development has moved very slowly since the introduction of annotations and generics in Java 5, and the majority of interesting Java language work has occurred with JVM languages such as Scala. If you need to use the JVM, then a more advanced language like Scala may fit your needs (note that Scala will integrate with existing Java libraries)
Going forwards, check out Project Coin, which is the set of proposed language developments for Java 7.
Instead of rewriting your application in Java, you may want to consider Mainsofts products which recompile MSIL to Java byte code.
http://dev.mainsoft.com/Default.aspx?tabid=166
精彩评论