views:

247

answers:

10

Greetings! I’m a .Net developer (VB.Net, C#) with 5 years experience. I would like to learn the Java programming language. What tools do you recommend for a programmer who wants to learn to program in Java SE? I’m specifically interested in books, tutorials and tools that would enable an existing programmer to learn Java in a short time.

Also, what IDE is the best tool to learn Java (not what’s the best, but what IDE is more appropriate for a java student/newbie)? Thank you very much!

+2  A: 

Eclipse is hands-down the best IDE. The code completion alone makes it great, but it also takes care of compiling, etc. for you.

Head First Java is a great book to get going with Java quick. As an added bonus, it's actually fun to read.

Zack
+4  A: 

I think that the best approach is to go to the Sun official Java tutorial and skim it and just stop at everything that looks unfamiliar and read more carefully. Most tutorials are aimed at people who never developed before, but IMHO the Sun one is fairly useful even for people who do understand programming.

I would also recommend reading a C#-to-java tutorial or a difference guide. For example, a short summary of differences with code samples.

I think that Eclipse is a good IDE and should be straightforward to use.

Also, a word of warning: if you decide to use a book on Java, make sure that it is updated to Java 5 and up. In the early days Java missed support for generics and that made everything incredibly clunky.

Pay special attention to the tutorial chapters about the collections framework and the Java threading model. Wait with the other APIs (e.g., GUIs with swings). Also be aware that the Java library is somewhat limited. As you improve, you may want to take a look at the apache commons project for many things that the main library is missing.

Uri
A: 

In terms of the IDE, I've been using Eclipse for a while, but I hear NetBeans is pretty good these days too (I really hated it before, am willing to try it again now though).

CookieOfFortune
A: 

I'm a java developer and I wanted to learn C# and I just opened up Visual Studio and read some articles and away I went. The languages are extremely similar so I would just say go ahead and jump in. Download eclipse and play with some examples and read the tutorials on Suns site.

Peter D
A: 

One of the best essays I've read regarding people who want to learn anything fast.

idrosid
I don't think you are answering the question, maybe you should have left a comment instead.And there is a big difference between trying to learn programming fast, and for one who knows programming to try to learn a new language fast.
FarmBoy
Especially C#->Java.
Adam Jaskiewicz
I understand your point and in a way I agree with you. However, I'm fed up with everyone around me trying to do things fast, so I couldn't resist the temptation of giving this bitter answer.
idrosid
"Fast" is relative. A time wasn't specified, so I was figuring 90 days or so. This isn't English->Bengali in 30 days, it's more like Italian->basic Spanish in 90 days.
Adam Jaskiewicz
+1  A: 

BlueJ is an IDE designed for teaching Java. Eclipse (and it's like) are undoubtedly powerful, but perhaps this is a better introductory tool.

Brian Agnew
A: 

Since you have 5 years of experience with C# and .NET I'll say you don't need a special tool To learn the languege itself (The syntax is basicly the same with Minor differences which you will learn on the way) , OOP remains the same... , Class libraries are very similar.

As someone who is C++ and C# programmer and had to do a project with JAVA half a year ago ,Here are my advices:

Don't spend time with studying the syntax, it is a waste of time.

Spend some time ( day or two )to learn your new IDE (Eclipse can be good ,and it is conseptualy bit differernt from visual studio).

Spend some day or two to learn the JAVA platform and the enviroment , there are some differences from .NET on this aspect. Learn the basic of building projects , JAR , Packages , VM tunning , ETC , but focus only on the basics.

According to your project , Identify what parts of the Class Library you need to study and read about it.

Start Code , Compilation error -> Google , Need something from the class library -> google, Any other problem you have ->.....Google.

After you have been through all these phases , Ask your self whether you want to specialize with JAVA , If the answer is true, start digging into the internals.

A: 

Get a good IDE. I like IntelliJ IDEA, but Eclipse is ok.

However, after using Visual Studio .NET, you will HATE them with a passion for a while. The level of functionality is..... lacking. IDEA is the closest in my opinion, especially if you are used to Resharper.

BTW, most people who say "VS.NET sucks", tend to finish the sentence with "I used VS.NET 2002 and I love Eclipse". It just feels unpolished to me.

Anyway, I'm stuck with Eclipse (+Aptana + PHP) as I'm doing PHP stuff at the moment.... urgh.

After that - it depends on what frameworks you wanna use. Java language is trivial if you know C#, they are nearly identical. The JDK isn't too far from the basics of the CLR, so just have a play - code katas and patterns are a good place to start. Pick a small project, where you know the problem already (eg something you have done in .NET) and reimplement it in Java.

Then, workout the framework you are going to use (eg Google App Engine, Spring, Hibernate) and start learning that.

99% of it is in the frameworks - just like .NET.

Nic Wise
A: 

Regarding the IDE I think Netbeans is good because of it's graphic interphase that makes it easier to develop the visuals. I've used Eclipse a bit and I know it is also good, and fairly less costly regarding system resources. However I still think you should give Netbeans a shot.

Luis Armando
A: 

I swear I'm not a shill, but I learned Java from the (excellent at the time, and probably still is) book Java in a Nutshell. It's an edition or two past what I learned, but it had VERY clear language, and a GREAT index for quickly looking up any concept, from inner classes, to access keywords, to even good examples on easy fundamentals like "how do I read in an entire text file?" (this was a MAJOR weakness of the 1st edition of "C# in a Nutshell" : USELESS examples. 3rd edition of that is good though, different author). I learned java from it, but for a C# guy, just take it out of the library, and it'll get you the essentials.

Kevin