views:

127

answers:

4

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 as 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?

+8  A: 

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.

Yishai
+1 for Effective Java - it's what I used earlier this year to get upto speed after 2-3 years
davek
+2  A: 

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.

Brian Agnew
Doesn't Hibernate/JPA provide similar functionality to LINQ?
Vincent Ramdhanie
I don't believe they provide the same fluent query mechanism over collections etc.
Brian Agnew
+2  A: 

Effective Java and Java in a Nutshell.

Effective Java to get you thinking in Java and Nutshell as your reference guide.

MarkPowell
A: 

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

Thorbjørn Ravn Andersen
Thanks, but that's not going to work, due to P/Invoke in 3rd party controls.
jasonh