Java, Where To Start?
I'm a web developer who has design and programming experience. So, VB, ASP, PHP, Coldfusion, Perl, even C and C++ I have in my belt. I also use Dreamweaver and/or do a lot of my HTML/XHTML/JavaScript coding by hand. So, the DOM, DHTML, etc, all good to me and even OOP thinking and design I have when I code. And I even have MySQL and other databases, again, not an issue here. So, my weak point is — Java — I see so many jobs out there with J2EE, Hibernate, Eclipse, Netbeans. Beside the obvious, which is to learn Java the core language, I don't know where else to go from there. There is so much! What should I read? in what order? What software do I require? UML? Swing? I mean, what is the curriculum required for someone to say they are a solid Java developer? Even assuming I have to go through Java itself, what are the good books out there?
Everyone and his dog does Java these days. Including 100.000 guys in India.
Be smart and find something new, cool and on the rise.
TCAP-Abort
I'm continually surprised by the number of shitty jvm-version-dependent apps that people get paid to crank out. Don't be that guy.
I started Visual C++ 5 with a book called "Beginning Visual C++ 5" by Ivor Horton from Wrox Press. When I started in Java I bought a book titled "Beginning Java" by Ivor Horton.
I would start there. Java is really straight forward OO language. The only issue you will have coming from C++ is to let go of destructors and realize Java does not use them. Many from C++ take about 6 months to stop tryng to make a finalizer into a destructor.
Isn't it better to specialise in a few of the varied languages and systems you have worked on, rather than trying to spread yourself thin?
There is truth in the saying 'jack of all trades - master of none'.
So, maybe concentrate on building up the other skills, rather than trying to 'bag' a new technology. I used to try to gain exposure to loads of different technologies but found that when you do so you do at the expense of the 'depth' of knowledge you have in any one.
I started with Eclipse (as I use it for LAMP development) and switched to Tomcat since I was already doing web dev and it was the quickest paradigm to switch to. I'm also trying to pick up STRUTS2 which judging from your background may also be a good choice for you. From there, the options are based upon your needs. For a book, I would not suggest Java headstart as you obviously are a bit further along in your development knowledge. Perhaps an O'reillys book on java.
This is my sig. There are many like it but this one is mine.
Thinking in Java is nice. And it's free. http://www.mindview.net/Books/TIJ/
You have Java. You could start by figuring that out.
I never really liked NetBeans, I tried it with ver 5 and decided to stick with IntelliJ and Eclipse.
Recently I decided to give NetBeans 6.1 a try and was quite impressed. There was little/no noticeable lag, unless I was coding while I was "running/debugging" a long-running process.
There are many things it does that I like over Eclipse.
I would suggest C# instead of Java. They are very similar languages but I find C# to be easier and more powerful. The Visual Studio development environment just blows Eclipse out of the water. I know its easy to hate MS, but their dev tools are just better than everyone else. Also, there are just as many if not more .NET jobs out there.
//TODO: Insert catchy phrase
Thinking in Java is a good book on the Java language. You can read it online at the author's web site: http://www.mindview.net/Books/TIJ/
... then learning Java, EJB, etc. ... it should be a walk in the park. You shouldn't even need a book. Just go get the specifications from the Sun site and read them.
Seriously, Java is orders of magnitude more simple than C++. (That's a pro and a con.)
public static void main () {
For basic coding practice, try the free http://javabat.com/ -- it has little coding problems (logic, strings, arrays, recursion) that run right in the browser, so you get immediate feedback. It's great for building skill in the basics, but it's no substitute for building larger programs. Disclaimer: I built it
Comment removed based on user account deletion
Learn servlets, and database connection pooling.
Don't get pushed into learning the full J2EE. Any project using EJB's is going to be a complete mess.
To work with just servlets and database connection pooling, get Tomcat http://tomcat.apache.org/ and DBCP http://commons.apache.org/dbcp/ from Apache.
Once you have some idea of how to work with those those two, you can use JSP with Struts or Spring and Hibernate, or whatever.
Eclipse is pretty good actually, I hated netbeans too.
A learning experience is one of those things that say, 'You know that thing you just did? Don't do that.' - D. Adams
I would read:
Head First Design Patterns
Effective Java
Pragmatic Programmer
I found it useful when I was learning the language to have Java in a nutshell
If you want to do Java web programming learn Struts.
Sun has developed a program to train for java.
read at the sun site
java is relative simple. Those certification programs give you a guideline what is involved in certain roles. But java is MUCH and lots of simple libraries. that is what people underestimate.
I understand you might not need certification, but the knowledge described there gives a good idea what you need/can put on your CV.
My first Java book was: head first. http://oreilly.com/catalog/9780596004651/
This great if you have little experience with an object oriented language. They state that they are funny...Well sometimes they are :-).
Another way to learn java is to code a little Java mobile App. This is fun, the API is quite limited usually and so you don't need hours of documentation before seeing something nice.
The blackberry IDE was free and really nice to use back in my early days. You get the basic before heading to more serious things.
If you want a Java job, just update your resume to say that you know Java. I have met lots of J2EE experts at work, who would not be able to code a "Hello World" program, if their jobs depended on it. Also learn lots of buzz words.
If you want to learn Java for knowledge, join a community college, install Eclipse and get started.
As a person in charge of desktop imaging and 3rd level support at a company of 100,000 desktop and notebooks, I'd first say, "don't use Java at all". My second thought is, "well, if you must use it at all, use it only on the server.".
Unfortunately Sun, in its infinite wisdom, has no idea at all how to patch. They have security vulnerabilities all the time and they make you install a completely new version of Java in a new folder each time. Their "updates" leave the older vulnerable versions behind (and still accessible by malicious code). Their updates break applications all the time. We are constantly having to deal with issues like the current one we have: there are known vulnerabilities in JVM 1.6.0_05b13, but there are some serious problems with deploying the "fixed" version as it causes bizarre error messages and slows Internet Explorer down. Both are acknowledged bugs, but won't be fixed soon. So you end up stuck between securing the systems and having the systems actually work right.
Sun Java is a continual nightmare.
I'll say one thing from Microsoft - when you could use MS Java it never (not once in the several years we supported it) broke apps and patches were actually PATCHES and not whole new broken versions.
Java - just say no until they actually learn how to update and patch correctly.
Java is a good language to learn for the current marketplace.
The real problem thats putting people at risk of outsourcing is not the choice of language.
Its all about your skill as a programmer. If you're average, then there are plenty of average coders willing to work for less in India.
No, you've got to be better then average, great even, and that takes a lot of work.
A learning experience is one of those things that say, 'You know that thing you just did? Don't do that.' - D. Adams
Please, for the love of God, forget the frameworks. They come and go pretty quickly and each one is usually over-hyped to begin with.
Learn to be a great Java programmer. That means knowing the standard library in and out. Develop really good OO modeling skills. Learn what it means to write robust code. Understand and use exceptions effectively instead of littering blank catch blocks everywhere. All of these skills will serve you far better than knowing what arguments the RegistrarClassFactoryStubGeneratorJarBridge uses in its create() method. From there, as needs come up, you can experiment with higher-level abstractions. But please do NOT become one of those people that 'learns' that all database access should be handled through *insert-ridiculously-overcomplicated-framework-with-50-config-files-that-must-be-in-special-places.*
Aside: the reason Rails became so popular is because it managed to 'just work' without all of this inane configuration and magic files. The Java community is practically in love with complexity, since it is very enterprise-y.
The key is the libraries: that's where it goes from being merely another OO language to being able to do something useful. I'd start by getting a simple "hello world" program running, then thinking up a home project which allows you to start adding features and functions.
Most of the documentation I've seen is pretty poor - it gives argument lists and describes functionality in isolation, but misses out the higher level WHY you would want to use a function. Learning that is where the gold is.
politicians are like babies' nappies: they should both be changed regularly and for the same reasons
Java's an entire ecosystem unto itself these days. So there's no simple answer - you have to figure out what kind of apps you want to be involved in building, then that will inform your choice of Java based technologies. For the most part I do enterprise web site development, and that mostly on the server-side, so I'm a Java EE/Hibernate/Spring/Eclipse person. Plenty of professional experienced Java developers will never use any of those technologies!
Once you've figured out what kind of apps you want to be building, I'd suggest visiting the Sun Forums if you have any technical question and then poking around the Java.net site, theserverside.org, JavaRanch and the java usenet newsgroups to get a better feel for what's out there and how it's rated by developers. Feel free to drop me an email if you have any questions that you want to ask offline.
Ignore the naysayers - for the most part they don't know what they're talking about. Sure you should have other languages under your belt, sure there's offshore competition, but still, Java experts are in demand and they will be for a long time yet.
--- These are not words: wierd, genious, rediculous
The language itself won't be a problem if you've done C and C++, nor should OO concepts. So the difficulty is with APIs - what is worth it, and what isn't.
In terms of Java APIs (core or otherwise), I'd learn in roughly this order:
* Collections
* Reflection
* IO
* Servlets & JSPs then Struts, Tiles, Spring, etc
* JDBC, then Hibernate
* Axis (web services) and Apache HTTPClient
You don't need to learn them off by heart - I've seen people advance very slowly because they're trying to do that. It is enough to know what is what, so that when you have a problem, you know there is a solution, and where it is.
In terms of interfaces, I wouldn't bother with Swing or AWT really, until you need them. SWT ain't too bad (Eclipse uses it, and it's cross platform enough - Windows, Linux, Mac, Pocket PC, ...). Maybe you could be fancy and learn Fenggui instead! Then you could learn JOGL and write 3D games and the like.
Oh, and learn how to do Java on the command line first, use ANT to build and compile and deploy, then try Eclipse or NetBeans as an IDE. This way you'll avoid all the niceties that the IDE gives you that inhibits your initial learning.
I wouldn't bother with half of the enterprise wank, like Enterprise Beans and all that.
I don't know where else to go from there. There is so much!
There's a lot because Java web technologies are large and can be complex. This can be a problem in itself. It's hard to really understand what you're asking without understanding what you're doing now. Do you have a job, or are you just interested in padding your resume with a broader base of skills?
Here's what I'll tell you. It's useful to learn a broad range of skills, but at a certain point you're just spreading yourself thin. You're having trouble finding out where to start because the technology has grown leaps an bounds. You haven't even mentioned half of the methodologies and competing technologies that exist in the Java world. If you really want to be "good" at Java web stuff, it's going to take a dedicated effort. Sure, you could learn a bit and create something functional. But why? It sounds like you're already a competent programmer in a variety of other languages, so why pickup Java?
Without knowing more about your background and goals, I'd hesitate to say you're just going to spread yourself thin. If you really want to learn something, learn some more general design patterns and techniques and apply them in a language you already know. That should be applicable to any language.
AccountKiller
You've already got experience in VB and ASP...ASP.NET is a logical career path. You can use that as a springboard to learn C# and if you really want to you can learn Java from there.
Otherwise, the best way to get started in Java is to get a job where you can convince them you can learn it on the job.
I really like O'Reilly's Java in a Nutshell. Between that and Sun's online Java Tutorial and API Reference, you should be able to get a good start with the language itself.
For more "advanced" topics, there are whole books on Swing, Spring, Servlets, JSPs, EJBs, etc... each with their own encyclopedia of information -- you should definitely learn the core language first, and then decide which of these frameworks interest you, and pick one at a time to learn. Most places will hire you if you have solid Java skills, and will expect you to be able to figure out the framework.
There are many books on individual aspects of the Java language, such as Java Concurrency in Practice -- if you really want to be a Java expert. Most of those job listings you see don't require anywhere near that level of expertise, though.
By learning C#, you can do ASP.NET 3.0 (a world away from ASP), a huge market in need of coders, you can branch out into things like SharePoint, the current hottest product in the marketplace, and even do stuff like Silverlight, which proved effective during the Olympics (If you ran Windows or SOME Macs).
The languages are almost identical, but you will find tons more FREE resources for developers. Microsoft has a development center at http://msdn.microsoft.com/en-us/beginner/default.aspx where you can download C# 2008 express for free, and there are lots of videos and tutorials there to get you started.
Again, nothing against Java, but why start like a guppy in a huge pond of Java sharks?
Once you get the basic Java syntax (which will not take long looking at the langages you already know), read this book: Effective Java , by Joshua Bloch.
There is also a video on YouTube: Effective Java Programming with Joshua Bloch.
And you can read it on Google Books.
I'd suggest starting with Groovy (http://groovy.codehaus.org/) then perhaps move in to Grails (http://grails.org). Groovy is a dynamic language that runs *on* the JVM, and can co-exist with native Java code, but requires far less boilerplate code to get anything done. If you're coming from a dynamic language background, Groovy will be a bit easier to understand.
This will allow you to get involved with Java technologies without as steep a learning curve as you'd require if you were doing it 'from scratch'. You can incorporate as much 'other' Java tech as you want as you go along, but you'll be up and running fast with Groovy.
http://michaelkimsal.com/blog/grails-for-php-developers/grails-for-php-developers-part-1 is few part series on did on Groovy and Grails for people coming to it from non-Java backgrounds. Never quite finished the series, but it's someplace to look to see if it's something to investigate further.
Good luck!
creation science book
The problem that I found was that Java can be used in so many ways and in so many contexts you can spend a year just trying to figure out what the all the new terms mean.
For a simple setup for serverside web development with Java server pages and servlets try: Eclipse and Tomcat and the Sysdeo plugin for Eclipse/tomcat development.
Once you have figured out how to setup Tomcat with pooled connections for MySQL, Eclipse and produce some jsp's & servlets, learned the classes that java provides for web development you will have come a long way.
There are then extensions (OK not necessarily extensions, but other things to look at) like struts which provide a framework for developing web applications and J2EE which are essentially classes that run on seperate servers.
The list goes on and on, but once you've done some stuff with each of these you will have a pretty good idea of what is useful to you.
Err... Starbucks maybe? Or off the coast of India?
Open Office is not Java based.
Im afraid of your general request. Mostly because of the "What software do I require? UML? Swing?" part.
How come somebody who knows... "So, VB, ASP, PHP, Coldfusion, Perl, even C and C++ I have in my belt."
Even MySQL (seriulsy wtf?).... doesnt know that UML is not a software. and putting it on the same phrase as swing. id say you stick with php...
OpenOffice is not Java based at all. The bulk of it is written in either C or C++. Sun doesn't just have Java based products, heck even the Java Desktop System is not made of Java at all, it's just a modified Gnome, written in C.
"Not to mention all the idiots who use words like boxen."
Anonymous Coward on Monday August 04, @06:49PM
If you are a serious programmer and want to solve real business problems, concentrate on what Java does well - glue things together and use well thought out class structures to map onto the things you want to do.
In my admittedly limited experience over only 25 years or so, if you leverage the strengths of Java you can do things you can do in other languages about as fast, with good reliability, good debugging, good code re-usage and rare platform incompatibilities.
Oh, and get used to Derby (formerly Cloudscape), because you can then have your SQL database all bound up in your 100% Java application and still talk to spreadsheets etc. as easily as if you were using Access.
From scarped cliff or quarried stone she cries "A thousand types are gone, I care for nothing, no not one."
It's a difficult industry to get into as you're probably aware. Recruiting for Java posts is a minefield - it's full of people who should be stacking shelves in a supermarket.
I don't think you can go far wrong if you get as much experience in core Java as possible. The same goes for J2EE; if you understand what it is and know the trials and tribulations of building a web-app from scratch, you're on the right track. Then, and only then, should you move onto working with frameworks; so build applications both stand-alone and web, and do the boring stuff yourself (i.e., write your own web.xml.)
Spring and Hibernate are funny ones. Spring's just an IoC framework. Until you're proficient in OO design, you probably shouldn't worry about it. Oh, and learn what IoC is first. Don't just think 'spring' and say you know it. Very few people know why they chose spring as a framework (there are plenty of IoC containers out there).
Hibernate (an ORM solution) is a dark art. Get the basics done first. Write JDBC DAOs yourself and learn why you'd need ORM before you dive into it.
Basically, learn the core concepts.
ilovegeorgebush
What?! Well, why is Open Office so slow then?
As others have no doubt mentioned, Java is a much simpler language than C++, and, if you know C++, learning the basics of Java will not take comparatively much work. I would recommend reading a lightweight book which concisely explains the basics, and then attempting to write some programs in the language. There is no need to get a book designed from programming novices. You might even look at the Java Tutorials online. http://java.sun.com/docs/books/tutorial/ Additionally, using Google to search for 'Java for C++ programmers yields some useful results, such as this one: http://www.javacommerce.com/displaypage.jsp?name=java_for_cplus.sql&id=18260
A vision of love, wearing boxing gloves and singing hearts and flowers.
Get Joshua Bloch's "Effective Java: Programming Language Guide". It's utterly indispensable; those who follow the guidelines stand out to me as proper Java developers rather than self-taught cowboy hackers :)
You mean he shouldn't use a language that is popular
And you are brillant!
http://thedailywtf.com/Articles/The_Brillant_Paula_Bean.aspx
I hate those 400-page stream-of-consciousness dumps, so I usually try to pick up language specs. There's Gosling, Joy, Steele, and Pracha, which you can get for $27 from Amazon. My respected colleague Jack Davidson has a book out, it's probably quite good. but it looks pretty expensive. Personally I'd avoid anything whose title contains the words "thinking", "patterns", or, God Forbid, "UML". Try to get a feeling for whether the book spends most of its time (1) defining the language and giving examples of good usage, (2) evangelizing the language, or (3) giving sort of politically-correct faddish advice about usage like "don't use singletons" or the Law of Demeter. Object Oriented style adds little value in any case, it's sort of like quibbling with Van Gogh about where the best place to hang his paintings would be, once he's painted them (let's put all the blue ones together!) All form and no content.
O'Reillys "Head First Java" is IMHO the best technical resource / learning tool I've ever used; it's honestly fun to read. You can read it online for 30 days free using the Safari service.
A favorite excerpt of mine (on how to remember the single-inheritance, multiple-interface concept):
Roses are red,
Violets are blue,
Extend only one,
But implement two!"
I haven't primarily been a JEE developer so others can give better advice on some of those technologies.
http://java.sun.com/docs/books/tutorial/index.html This is official Java tutorial. http://java.sun.com/javase/6/docs/api/ This is official Java API. You can learn everything (or almost everything, but definitelly it will get you to know much more than you know now) about Java from this. That's the only online stuff I've seen (I mean about any language, not only Java) that's free and is as good as a very good book.
My Windows is NOT slow, it's special!
Ensure your concurrency skills are up to snuff. Read about the newer (1.5+ so not that new admittedly) ways of handling concurrency in Java - a lot of older books will miss the java.util.concurrent frameworks.
Persistance frameworks are all well and good, but understand the fundamentals of how things work at the database level inside Java.
Although this changed a little with the latest rev of EJB, many sites simply dumped it and went with Spring. Worth knowing.
Pick one and know one, use that to extrapolate to the rest. My own advice is to look at Tomcat, but just knowing the basic concepts behind them is a start.
There's probably a lot I've missed, but right now I'd consider looking at those.
Cheers,
Ian
Learn to program. Then using languages to express the programming ideas is just a mapping process. Libraries, tool kits and development environments are additional tricks in the developers bag.
Learn procedural programming.
Learn object oriented programming.
Learn declarative programming.
Learn how programs use network and system resources.
Get a task, look at the available tools, and hardware. Pick a tool set, this includes the language and complete the task.
> Basically, learn the core concepts.
You will be much more valuable and won't get left behind when the whole world taks a left turn in 6 months.
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
http://java.sun.com/docs/books/tutorial/ You really only need the JDK. I'd get "JDK 6 Update 7 with Java EE" at http://java.sun.com/javase/downloads/index.jsp and also the javadoc distribution. Start with that and a good IDE like Netbeans or Eclipse. I'd actually recommend Netbeans although I use Eclipse myself; Netbeans should be easier to get started with and seems to be a little less quirky. Some of Sun's tutorials have code that are already Netbeans projects. Go through basics first like understanding the langauge (e.g. differences/similarities w/ languages you know) before worrying about stuff like Swing (UI), or anything J2EE-related- you'll get there eventually.
Do a Sun Java Certified Programmer exam. As far as looking for jobs goes, it won't count for much on your CV, although it may help you get past a phone screen. It must be said though, that doing the study to pass the exam will give you a taste of the core language and give you some idea of what you want to learn next, which, by the way, isn't too difficult.
You go to Sun's website, book an exam voucher, do the study, and then book and sit the test through your local Prometric test centre.
As far as studying for it goes, there's a ton of material, including free exam test batteries on the Web.
Best core java books i have read:
- Effective Java from Joshua Bloch (second edition is available)
- Java concurrency in practice
- Head first series.
After that, you can chose books depending on what you want to do. And trust me you cannot find any platform/language having more resources and tools available than java.
I know Java; I can use it for almost everything except web development. My small amount of experience with using it in web development is that you make an object and the get/set methods, and the frameworks handle the rest. Something like Hibernate which can create get/set methods and your POJOs based on your database schema is very useful to know. Spring, Stripes, and the rest are very good as well. Knowing Java itself is the easiest part. If you actually got a job as a Java web developer and didn't know any of the frameworks, you wont be able to do anything. For those who suggested a different language than Java seem a bit biased. There is good money for knowledgeable Java programmers.
Thinking In Java by Bruce Eckel is available for free from his website. I recommend it as a starting point.
Eclipse RCP is growing in popularity and is built on the OSGi service framework, which is also gaining popularity on the server side. I'd highly recommend looking into Eclipse RCP. It has a vibrant open-source community that is eager for new helpers.
I found that the best book for a C programmer wanting to learn Java is Java in a Nutshell. It won't be good for anyone that doesn't already know C, though.
The book is pretty good. I have a signed copy of the book. He also offers a course based on the book which is pretty good.
Fight Spammers!
Thinking in Java, Java Essentials, and a real project to get your hands dirty is all you'll need.
In my experience, managers don't tend to care one whole hell of a lot about the skill level of local employees when a job goes offshore. You could be the worst or the best; at the end of the week, you are still laid off so that Anand & Prasun can have your job.
Couple of great books:
Effective Java Programming by Josh Bloch
and
Hardcore Java by Rober Simmons, Jr.
Since you already know OO you basically just need a bit of help with syntax and practices. The Nutshell book will give you syntax and the above books will give you good practices.
Also there are a lot of technologies out there for doing the same thing. Cayenne, JDO and Hibernate for object persistence in a DB, JaxB, xmlBeans, Castor for java to xml binding, etc. It can get really confusing.
Good Luck!
I prefer hands on learning to reading a book.
So I would suggest starting to play with one of the full-stack frameworks and consult their documentation, drill down deeper into the components that make up the frameworks read that documentation and then get yourself some good reference books on those.
Stacks to look at include
jboss-seam http://seamframework.org/
appfuse http://appfuse.org/display/APF/Home
Each of these stacks should allow you to mix and match some view layer technologies with a couple persistence mechanisms while remaining within a consistent environment end-to-end.
To test your understanding of the underlying components and frameworks go to
http://www.javablackbelt.com/
Cheers,
Neil.
Is Visual Studio actually written in .NET? Eclipse is. Does MS eat their own dog food? Is IIS written in .NET? Tomcat is. Any Windows application? calc.exe or at least notepad?
Honestly, all of these acronyms you can list, and yet you don't have the initiative to learn another language without posting silly questions like this?
It's not about "learning a new language". Learning Java is trivial. The problem is the hundreds of bloated, redundant, incompatible "frameworks" and "libraries" that exist for Java. Which one to learn is a valid question (albeit, it doesn't have a good answer).
You need to encapsulate that in a class. And your main method signature is wrong -- needs to take a String array as an argument, or else the program will say "No such method found (main)" and die.
Honestly, its almost like no one on Slashdot programs in Java some days... ;)
Help poke pirates in the eyepatch, arr.
Tomcat + JSP + JDBC to MySQL
Everything else except desktop apps build on that foundation.
If you got C++ down, Java is a piece of cake.
Richard Baldwin. He's fairly well-known online. He was a professor of mine that introduced me to Java. Check out his tutorials that he has posted online for free. These are what he pulls up in his class when he teaches. They're basically his lecture examples w/out the voice to go along with them. I went in with zero Java knowledge and came out a Java superstar (well, not quite, but I definitely came out with a very solid understanding of the language after the first semester). Check out his tutorials. He introduces Java concepts in a very easy to follow manner.
...as Java is an extremely rich and complex programming environment. The usual suspects (O'Reilly's "Java in a Nutshell," Eckel's "Thinking in Java") are good references (yes, I do recommend some trees in the bookshelf). Get familiar with the Java API documentation. You won't go far with more advanced J2EE constructs until you get the fundamentals down solid. Really, the best Java programmers are the ones with experience under their belt -- there's simply no substitute, as the complexity of the language simply removes any option of learning Java "from a book." As a long-time Java programmer (I didn't say I like it, but it does pay the bills), my suggestion is to simply jump in -- read the O'Reilly book, at least Part I, while sitting in front of a Java compiler and writing code! Along the way, find a Java open-source app that is (1) popular, (2) active, and (3) well-documented. Adopt it as your own...write some patches, create enhancements.
You won't even be ready for an entry-level position without at least a year of Java experience, and in this market, you will probably need much more than that. Keep your day job, jump in on an open-source Java app, and build the experience up over time. Don't let anyone convince you that learning Java is simply about learning its syntax. There are so many traps and gotchas in Java. The ones who give you that advice are probably the ones who couldn't code their way out of a wet paper sack.
If you know C++, learning Java is trivial. But getting "Java" on your resume won't get you a job. With Java, it's all in the frameworks and toolkits.
Learning those takes time: there are hundreds of them, they tend to be bloated and idiosyncratic. It's that kind of obscure knowledge that companies hire and pay for.
Which one should you learn? Pick one that looks like it's up-and-coming but isn't enormously popular yet. That way, you'll have a head start. Don't expect it to be fun, though.
Java - learn your objects and your inheritance ... when you do Interfaces when you use Generics. Like others have say, Thinking in Java was a great book to start (2000 for me). Don't miss the annotations (introduced in Java 5) since a lot of software today use them.
I learned running programs from the command line and just used IDEs later. Learn about the command-line parameters, both the VM and the application ones. They don't go away with IDEs, they just handle them for you. Learn all you can about the classpath. It will come back to bite you, again and again.
- JDBC : You'll likely be talking with DBs so this API is your first step. The tutorial in Sun's site should be a good starting point. Learn when, how and why you should close your connections, resultsets and statements.
- Logging : Grab Apache's Log4J and learn how to use it. Play around with the configuration files.
- JUnit : If you fancy unit testing this should be your first tool. It integrates nicely with Eclipse.
- Ant : When you need to automate complex things you don't trust IDEs for or when you need to run them from the command line. Compiling, packaging, checking out from CVS, etc. Again, it integrates nicely with Eclipse.
On the J2EE side:
- Servlets and JSP : Install Apache's Tomcat and start playing around. Just plain old Servlets and JSP. Learn how to use objects in the various contexts: request, session, etc. Mess around with the HTTP headers in the response. Learn about Filters.
- EJB : You can safely ignore this for small / medium applications.
- ORM : Hibernate is an example. ORMs give you a software abstraction over a relational (and object-relational) DBMS.
- JNDI : To do directories queries. Often used.
You can then check out concepts like MVC and multi-tier : you don't need a specific framework for these. You can code by hand with simple Java classes and servlets (or JSPs) a primitive MVC framework. It might prove useful when using more sophisticated software like Spring and Hibernate.
There are several approaches to web development that are not standardized and basically compete with each other: Struts, Spring Web, Java Server Faces (JSF), Tapestry, ... I personally like JSF and would suggest you to try ICEFaces or Apache Trinidad.
Check out Spring, learn about "J2EE without EJBs". Try to integrate Spring and Hibernate.
Finally, check out web services with Axis or even, JBoss.
Note that JBoss will run your servlets/JSPs too (it runs tomcat); you'll only need it when using the more advanced features of J2EE, tough.
Happy hacking.
The O'Reilly book "Java in a Nutshell" provides a nice intro aimed at C++ people and goes on from there. If you have seen that many languages, the whole thing will make sense with a few hours work. Learning specific frameworks are probably the next step, but that is a religious subject I won't delve into.
If you don't agree read this:
Bjarne Stroustrup, creator of the C++ programming language, claims that C++ is experiencing a revival and
that there is a backlash against newer programming languages such as Java and C#. "C++ is bigger than ever.
There are more than three million C++ programmers. Everywhere I look there has been an uprising
- more and more projects are using C++. A lot of teaching was going to Java, but more are teaching C++ again.
There has been a backlash.", said Stroustrup.
He continues.. ..What would the world be like without Google?... Only C++ can allow you to create applications as powerful as MapReduce which allows them to create fast searches.
I totally agree. If Java ( or Pyhton etc. for that matter ) were fast enough why did Google choose C++ to build their insanely fast search engine. MapReduce rocks.. No Java solution can even come close.
I rest my case.
Well , i wouldn't jump into J2EE right away.
Start with the basics of Java . I suggest using Eclipse as an IDE .
Eclipse also works quite well for J2EE applications.
Offcourse J2EE is very big . If you want to make web applications , than you should look at Servlet and JSP/JSF to start with , and Session Beans .
If you want to start with simple web applications, Tomcat should be fine . If you want to create Business Applications , go with Jboss .
Slipping shoelaces ?
public static void main () {
use public static void main (String[] args) { if you wan't to get past the compiler
Also, keep in mind that a growing number of universities are making video lectures of complete courses available on the internet. Stanford University, for example, has uploaded a number of courses to youtube [ http://www.youtube.com/profile_play_list?user=stanforduniversity ]. One of them is CS106A, their introductory programming course (taught in Java). Might be too basic for you, but I'm just saying, it's out there. Of course, in programming there is no substitute for practice, practice, and more while(1){ Practice();} ;-)
Go get a CS degree and study programming language theory. Then you'll be worth something in the marketplace, and you'll see that the idea that knowing a certain language is a marketable skill is ridiculous. Seriously, if you have a decent CS background, picking up a new language won't be a big deal, and any employer worth their salt will know that. They won't hire you based on knowing Java or not...
www.python.org
Java has become more and more complex over the years. JDK 1.5 (or Java 5 or whatever they call it) and its introduction of generics and annotations was a major, and debatable, leap in complexity.
If possible, I would recommend starting with pre-1.5 Java, to get the basics right, and only then to move to 1.5 or 1.6.
"In our tactical decisions, we are operating contrary to our strategic interest."
We do Enterprise web development for a major University and leverage Java as our core language. We use a combination of software including Java, Hibernate, and Stripes to manage student information for tens of thousands of students. We have found this to be an excellent combination.
Recently, I have been experimenting with upgrading our platform by using Groovy for unit testing and batch jobs. Groovy is basically dynamic Java. It is 99% compatible with Java so essentially you can drop in you Java code and it will run except on a few edge cases. This is because Groovy compiles down to the same bytecode that a similar Java class does. You can't tell the difference except the smile on your face as your coding is reduces by approximately a 6:1 ratio.
Groovy incorporates some of the cool features that other 'dynamic' languages such as Ruby and Python have been rubbing in us Java guys noses for quite awhile such as closures, operator overloading, and autoboxing. A good book on Groovy is by Scott Davis' called "Groovy Recipes" (ISBN 10 0-9787392-9-9). Groovy is the ticket to moving Java into the 21st century.
If you are feeling adventurous and are starting a project from scratch, I suggest another web framework called Grails. This convention based framework and development environment uses the Groovy language and leverages popular and solid frameworks available such as Hibernate and Spring. A good book on Grails is "Beginning Groovy and Grails: From Novice to Professional" (ISBN: 978-1-4302-1045-0).
Dynamic Java is here folks and it runs on the JVM which is where things seem to be heading (JRuby, Jython,..). Why use a language that must be transformed to use the JVM? Instead use a language that the JVM was designed for!
From the sound of your post, you've decided on learning Java, but I wanted to relate my previous experience and at least get you to question if Java is where you want to invest your time.
I've spent most of my career (about 5 years) working in C++, but for various reasons a few months ago, I wanted to make a change. It came down to either Java or C#. I had done a little of each: C# in my spare time and Java in college. Due to my limited experience, I had no preference. Since I had no preference, I searched the job boards for Java and C# positions. If I recall, there were about 30 C# positions and about 35 Java positions, so that metric was a wash. The tipping point came when I compared salaries. C# positions, at least in my area, paid significantly more. My assumption is that colleges teaching Java allows employers a better selection and can therefore pay less. So, do some research into your local markets and see which language you should invest your time in.
In case anyone is curious, the job market for C++ is small to non-existent in my area and that is the primary reason I decided to move away from C++.
BOOKS
-----
Learning Java (O'Reilly) - one of their better books in recent years, and actually kept up to date with new editions
Effective Java (Addison Wesley) - preferably the second edition, which covers generics
J2EE Design And Development (Wrox) - heavy going, but it's simply the best book on J2EE development
ANT In Action (Manning) - describes the de-facto build tool in the Java world, which can also automate things like deployment
TOOLS
-----
Checkstyle http://checkstyle.sf.net/ - a basic static analysis tool
PMD pmd.sf.net - a more advanced static analysis tool
THINGS TO AVOID
---------------
EJB - it's gotten better in version 3.0, but a lightweight framework like Spring is still a better choice for almost every project
Maven - it might be great for some Apache hosted projects, but it's caused more problems than it solves on every system I've worked on with it
Search google: SCJP, SCWCD. Become Sun Certified and you will be at a level.
'Cause it's shit, basically.
KOffice has come a loooong way, much like Konqueror (which is now WebCore really, an open source success story!) with a lot of code optimization, bug fixes, streamlining etc. and is becoming a pretty mature office set. It's also had a little visual polish applied to snazz its looks up a bit.
OpenOffice hasn't.
Don't use it.
The truth shall always be free: Boris Floricic is Tron.
Seriously, is there some shortage on Java dicumentation out there or something? Granted, I don't know the language as I never had a need for it, but I can't trip over without falling into a pile of Java tutorials.
That is precisely the point of the question. You could quite easily spend 6 months solidly reading the stuff out there, so what OP is looking for is a recommendation or two to save him spending months finding the stuff that's worth reading in the piles of dross. I'm hoping there are some good answers, because I to would quite like to get a handle on the more enterprisey side of Java.
For starters, I've recommended the Head Start series to a number of folks. Once they get comfortable with the core language features, I usually sugest finding a manageable program that interests them and diving in. I help a little, they do most of it. Then pick another with a different skill set. Lather, rinse, repeat.
On a more philosophical level, I'm a professional Java software engineer and when I'm looking for new team members, I'm looking largely for people that can figure things out on their own. I know that if a project comes down the pipeline that requires, say, building a PHP website (god forbid), that they can figure it out even without experience. Knowing how to learn is a primary skill for us.
It is only there to start the JAVA vs xxxx holy wars that bring in the advertizing revenue as everybody and their brother/sister chime in, again, and again, and again......
Undetectable Steganography? Yep, there's an app fo
The canonical NASA JPL Video...
I would say, "Learn enough Java to know what you're talking about," and then mention Java's limitations in your interview.
The Right Reverend K. Reid Wightman,
I currelty use OpenOffice, and I've used KOffice as well. I like them both. They are both viable efforts. I do agree that OpenOffice has some rough spots, but I don't think that they're serious enough to completely dismiss it as a workable alternative.
Study the design and implimentation of multi threaded client - server applications. Then study how to impliment them useing Java. Then go and get one of those jobs. These are very hard to outsource.
Undetectable Steganography? Yep, there's an app fo
If you're a bright programmer wanting to go into web development, I'd say "don't learn Java, learn Django".
Ditch Internet Explorer. Problem solved.
A straight answer: leverage your knowledge of web development by starting with servlets, then move on to JSP.
Regarding tools, I've had good results with NetBeans with both novice and veteran Java developers. The "Web & Java EE" bundle comes with both Apache Tomcat.
org.slashdot.post.SignatureNotFoundException: ewg
Is Visual Studio actually written in .NET? Eclipse is... Is IIS written in .NET? Tomcat is.
.NET must have lots going for it if even Sun are writing all their tools in it.
Interesting! How does it compare with IntelliJ IDEA?
I've been using IntelliJ for years, and love it. Every year or so somebody talks me into trying the latest build of whatever, swearing (without haveing tried IntelliJ) that it's just as good. I've ended up disappointed so many times that I've kinda given up trying new Java tools.
Did anyone else hear this story in Yoda's voice when you read it?
My CS degree from University of Washington was based on Java. These are all recommendations from working through that degree. To learn the basics of Java I highly recommend Sun's books online. They are as well written as most things out there and I never found a need to use much else. The class library for Java is also much more straight forward and enlightening that anything Microsoft makes. Before I got itno the online resoursces, I actually referenced a lot of C# primer plus as the two languages are so similar. For Servlets and JSP I really like Murach's Java Servlets and JSP. Its a good basic intro and it will have a lot that you already know. However, its one of the best written books I've read and gets right to the point rather than filling pages with bloat. I'm really a big fan of Murach's books... they come out at a slower pace but have a lot more quality control than other series. For development I highly recommend either starting with Dr. Java or getting Eclipse and downloading the Dr. Java plugin. TextPad is also a good backup compiler to use. On one hand, Dr. Java is very simple and easy to use but has some bugs, but Eclipse is a big IDE to get into at first and start loading plugins can be confusing if you're not use to it. However, either way Dr. Java is an incredible learning resource. It allows you to play with Java in real time, so if you make an object, you can go into the Dr. Java interactions window and make an instance of your object and call its methods to see how it works all without making a wrapper class to test it. You can also play with core Java code too. So you can go in and type something like: int x = 8*2; x; and it will print out the value of x for you. All done without compiling or even having a file open. Its really nice to use to get use to how arrays and various other data structures work in Java. I also like some of the Java Data Structures and Algorithm textbooks just because those are good ways to see how the basics of the language work. However, I have always found for things like Swing, JOGL (openGL in Java), multithreaded programing or multiprocessor programming, etc I just prefer to use the resources online on Sun's site or through a google search. So many universities use Java now that you will get lots of .edu sites with really good tutorials.
I can't stress how good of a resource Dr. Java is though.
You will like to use Java for web-based applications using Tomcat as app server, JSP for "interface" with user and Java for control, data access and etc. You can keep simple (K.I.S.S.) and functional applications, and better if you are good enougth to emulate functions from frakeworks like hibernate (hibernate works, but is a elephant on your code) using more simple functions.
Religion: The greatest weapon of mass destruction of all time
If you've done from programming before in an OO language, or even C, the book Java in a Nutshell will offer you a great transition.
The first half of the book explains syntax specifics for the language, while the second half goes through the Java APIs. The middle gives an in-depth teaching of new Java 1.5 features. It's also a great reference manual, and will give you plenty of "I totally didn't know I could do that in Java!" moments.
If you haven't programmed before, or done OO programming before, this book probably isn't for you.
I wrote a small database tool in java a few years ago, and learned a lot about basic java doing so. It was just a routine to fill in blank records in one of our database tables. I learned IO, loops, and database query handling. It was something I would have normally done in bash, but it let me learn a new language.
I am writing a mobile application now, for cell phones. I am learning a lot. It seems that the gui code works well and is pretty intuitive. Networking and audio are quite difficult to work with. You should have an easier time with it, since you are already familiar with the Event Driven Programming model. In mobile java, your program isn't a program, it's a "midlet", so you have to work with the constraints of living in midlet land.
Or of course, just design a new website and pick a Java framework to it with.
If you want to help with my phone program, I'll shamelessly point you to http://talklock.sourceforge.net :)
anybody who replies directly to the question is an idiotic ass hole.
Java is only really used by corporate drones developing in-house crap-ware applications that you'll never be allowed to develop past the "it's good enough to fool the customer" stage. And in a year you'll be back to fix the bugs and crap design you didn't have the time to fix before. But only enough to make it good enough to fool the customer again. You'll never be allowed to "do the job properly".
/. asking if they should learn Java...
And I speak as one who has suffered through many such cycles in various companies. for the last 10+ years.
If you want to learn a high level language to develop web apps choose Ruby on Rails instead. If you want to right low level code, learn C (personally I don't think you're a real programmer if you don't grok pointers and recursion).
Then find a job working either for a software house developing a shrink-wrap product: because there it's in the company's interest to "get it right" or for a web boutique: because they'll be small, agile and do interesting stuff.
And don't blame me if in 10 years time you find yourself giving the same advice to someone on
Bad analogies are like waxing a monkey with a rainbow.
Possibly the only programming language book I've ever read almost page by page from start to finish -- half of it in one sitting on a flight to London from Boston. I'd meant to just look at it a bit then settle in and watch dvd's. The pace was just right and it had places you could gloss through if you already know how to code in other languages.
Best language book ever. Hands down.
Also, Kathy Sierra is great, and anything that supports her can't be a bad thing.
The problem with quotes on the internet, is that nobody bothers to check their veracity. -- Abraham Lincoln
Hibernate is just a prebuild house for accessing DB, generate SQL more (or less) automatic. You can still do it the 'old' way.
Swing is a whole set of GUI related objects. Just like you have in C-stuff GDI+, WINAPI, .NET-framework.
XML you'll have it in almost any language...
I started from C -> C++ -> C# ~> Java. A good book was also my problem. But once you know the C syntax, it's just a matter of learning what's different in Java (I almost did get an headache cause of the long syntax and abundance of the cryptic C syntax, but that is subjective ;-))
You can learn it by the internet also. Or just buy a reference work which you can use to differ out the differences.
Good luck!
http://python.org/
Just select a decent IDE (IntelliJ IDEA is the one for me), try to do a project with a few good frameworks and you're into it. Start learning maven and spring, they will completely change the way you develop code, and then try to learn hibernate, which will be the last time you think about databases.
So, while I get that the asker of the question is very serious, and some people answering him also, I don't get what the motivation about questions like this are. I mean: the guy tells us he basically knows everything (languages, tools, concepts) that is important about "programming".
So I would ask the asker: why do you want to learn/use Java?
So, the simple answer to his question is: ;D and a very short introduction into the syntax of Java)
just start coding. Besides an IDE you don't need anything for starting to work with Java (probably knowing how to browse Java Doc
The more complex answer: ... you don't really specialize your skills and neither you really broaden your skills (Java, C# etc. don't really add anything you don't already know from C++). You only add some TLAs to your skill set and you fit "at a first glance" better to job descriptions.
If you add Java to your language zoo
UML ... not MDA, that is to complex) will broaden your spectrum. Hint: Eclipse + OAW might be interesting to you. OAW is a MDSD tool chain, based on Java (if you use that, you will program a little bit in Java). With OAW you basically write your own generators, to transform specifications from UML into your language of choice (via templates and "Scripting" in Java)
If you did not use UML so far, you don't need it for Java either. However: learning UML and something about Model Driven Software Development (MDSD
Databases, Hibernate, MySQL ... but it goes to far to discuss this here) and also don't dig into JDO (Java Data Objects, a Java API) while the base idea is not to bad, most implementations just suck.
If you want to work with DBs you need a very basic knowledge about JDBC (a standard Java API) because all DB Frameworks use JDBC under the hood somehow / somewhere and the configuration of your DB access (URLs, Users, Passwords, Connection Pooling) will be always very similar regardless what framework you use. Besides Hibernate I would suggest to look at iBATIS, also (you will need the iBATIS book). EJB 3.0 is overkill IMHO (yeah it is not only persistence but also services etc.
Swing
First, a lot of people out there find Swing over complex and prefer SWT. I strongly suggest that you stick to Swing for several reasons. The complexity of Swing might increase your learning curve a bit. However, sooner or later you will need the features Swing gives you. And when you are a bit experienced in Swing, you will be very fluent with it. Note: Swing will be greatly improved in Java 7, when the "Swing Application Framework" is integrated (beta of that is available for Java 6 right now).
Similar to Swing and probably interesting for you is googles GWT (Google Web Toolkit). The programming model is very close to Swing. GWT is used to program (preferred in Eclipse, using the GWT Plugin) in Java, having Server side Code in Java, running on a Web Container (e.g. Tomcat) and having client side code programmed in Java, but cross compiled into Java Script running in a Web Browser (AJAX style).
Beyond Java ;D).
Just learn enough Java to be able to compile simple programs (well, 2 days or something
Then learn Groovy. Groovy is a "dynamic" language, that compiles to Java Byte Code and integrates into the Java Platform. Groovy is mainly used for scripting, but it is a serious platform for development as well. Groovy is also used to develop Domain Specific Languages(DSLs), one thing that will become a future market.
Dig into Ant, a "XML based scripting language", mainly used for build files. But don't be tempted to use it for to much. If you find Ant useful, and if you got a grip on Groovy, then use gant.
Groovy uses a concept of builders which is used e.g. to program Swing UIs, to "build up" Ant-Scripts (gant), to "invent" DSLs (for configuration of your Java/Groovy programs) which can be adapte
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Learn Java with the BlueJ book:
http://www.bluej.org/
Why?
1- Objects First.
2- An IDE that will tell you about what's going on with your objects.
3- You will be working with code already existing. You will then be asked to modify the classes. This is much more realistic, because usually you don't write the whole software by yourself. An essential skill is understanding other people's code and being able to work with existing classes. Supposedly, this is the big thing about OOP.
The IDE helps a lot. It kind of feels like Smalltalk - a Good Thing (TM), IMHO.
At least, get an "objects first" book. So many books teach Java as it were C, objects and classes being squashed in the middle.
Also, as a second book you will want a book on Data Structures. This being Java, you will want a book that teaches you how to use the existing stuff. "Objects, Abstraction, Data Structures and Design Using Java", by Koffman/Wolfgang is one I like.
PS: The BlueJ book is better than Thinking Java, IMHO.
Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
I never really liked NetBeans, I tried it with ver 5 and decided to stick with IntelliJ and Eclipse.
This is one of the examples that us Java foreigners want to learn. Here are some Java buzzwords that you see in jobs asking for devs:
Netbeans
J2EE
Eclipse
Jakarta
Struts
MVC (which isn't a java-only concept, but then again, newbies don't know)
Websphere
I really wish there would be an "intro to java technologies" book that explained newbies like me, with diagrams and colored figures what the heck is each buzzword and what it means, but I don't just mean a dictionary paragraph.
See, anyone could spend a couple of days googling each buzzword, but then there's the problem that one could learn TOO MUCH and get TOO DEEP trying to undersand ONE OF MANY things in java. And then you can find out that what you learned won't get you anywhere because suddenly the technology you learned became obsolete.
Around 8 years ago, I tried to learn java and JSP, and then found out that everyone switched to J2EE. Then I tried to learn J2EE and completely got lost. Then I tried to look at some J2EE courses sponsored by IBM but they costed at least $600. Then I said "fuck it, I'll stick to PHP. I can install an Apache webserver in one click on my Windows compy and I'll learn PHP on my own - for free". Try that with Java. See, the problem isn't the language itself, but the bunch of stuff built on Java, the frameworks built on java, AND the popular apps built upon some of the java frameworks, which is actually what the companies expect you to know.
What we need is a broadth-first approach of learning, starting with the language (one chapter for the java basics and examples should be enough). I mean explaining only the basics of each, comparing different technologies, telling you where they fit in a web app, and which ones are recommended or not, and why.
If you wish to learn java would suggest starting at www.roseindia.net have some really nice java tutorials to start you off and off course deitel and deitel java books are always nice for starters.
If you're an experienced programmer, you can't do better that "Just Java". http://www.amazon.com/Just-Java-6th-Microsystems-Press/dp/0131482114 I wrote it when I was working with Java at Sun Microsystems, and it is intended to help busy professionals pick up Java. It covers not just the language, but the whole ecosystem of tools, releases, certification, SDKs etc etc. Peter
The Java Tutorials
IMHO, the best way to learn java. Comes from an authoritative source, too :o)
"The agriculture ministry is not in charge of Gundam" - Japanese ministry official.
...offers a pretty good solution that allows you to use real SQL, kept separate from your Java code and cleanly returns objects for your Java code to deal with. Might be worth a consideration if you haven't looked at it yet.
here
Also you can download javadocs onto your hard drive to see the object oriented relationship and class structure of all the core Java api's. Whats great about javadocs is that its a tool that will automatically autodocument your whole program for you in the same tree structure. All you have to do is put a "///" instead of a "//" and your comments will be recorded in the html tree of your documentation as well. No other language comes close to this besides perldocs. Sandcastle is Microsoft's way of a javadoc knockoff for c# but its not finished yet.
This of course assumes you know how object oriented programming works which you do according to your experience in C++. You can learn java quickly if your familiar with these concepts as even data types such as strings and integers are objects in Java.
I used the sixth edition of this book when I took advanced java programming in college which is very detailed with over 10k lines of code. Its very academic oriented if you do not mind it but has directions on how to do almost anything. You can skip sections such as if/then structures and see how the memory reference object oriented model works and how its different from other languages.
This newer edition even has tutorials on ajax. Damn I am tempted to get it.
Keep in mind I have not written a line of code in over 2 years and am not a professional programmer so take what I say with a grain of salt.
However I do agree with others here that unless you have real work experience with java that you will be turned down from any job requiring it regardless of your experience. HR wants the impossible and do not understand programmers. They think programmers who use different languages can't learn another and they also worry about retraining costs. If all they have is an entry level budget then they can hire an Indian to do the work for alot cheaper sigh.
If i were you I would write small applications in java at work for small intranet sites so you could claim you have X amount of years of experience web programming and used java. This will satisfy the HR weenies so you can then interview and you can show your better for mission critical work than abunch of Indians. (Perhaps this is why I do not want to work in I.T. again)
Do not mention you programmed in Java for X years. Just mention that you programmed for X years and used Java and this will get you past the filter. But try it at work with something small.
http://saveie6.com/
So, VB, ASP, PHP, Coldfusion, Perl, even C and C++ I have in my belt.
...or maybe you meant "under" instead of "in" your belt? ;)
Jeez, I'd love to see the belt you're wearing, it obviously has pouches in it like batman's!
As a Java developer for nigh on ten years now, and someone who painfully learned how to program database connections by hand, then use orms like Hibernate, I might caution against Struts (though the rest of your order-of-learning is excellent). Struts was definitely in my path of learning, but I am not sure what it offers these days that isn't done more comprehensively - and to my mind, more cleanly - with Spring.
Of course, there are a lot of legacy systems these days built on Struts - for good reason. So if you're looking to work on older code, it's not a bad thing. But if you're planning a career with stuff that is from scratch, I think that Spring forces one to code in a better manner than nearly any other framework out there.
It may be, of course, that I'm just in love with inversion of control - which I think is one of those things that, if you understand it, gives you a much better command of abstracted design.
One other thing I think is pretty cool is JavaBLACKbelt, which has a pretty good, community developed set of quizzes that are useful for gauging your own command of the language.
[Ego]out
I am in a similar situation than OP. I have been falling into Microsoft's .NET trap and for the last 8 years rewriting the same apps in the next version of the framework (VP goes to M$ seminar, sees new cool stuff, buys latest Visual Studio for the whole team, half the old code wont compile so we have to rewrite).
I got pretty tired of a framework where you expend half your development time working around its limitations and bugs instead of getting the job done so I quit that job and started looking for something else like Java. Now, it seems you need 5+ years experience in J2EE or some other crap to get the foot in the door.
Is there anybody out there willing to hire programmers with solid OO experience but little Java?
Should I just study Java for like a month and then change my resume claiming 5+ years experience?
Also, I have to plug the Head First series, which does a better job of explaining Java (and attendant CS theory) to visual learners than anything else I've run into, period.
[Ego]out
Read Josh Bloch's book "Effective Java", some parts of it deal specifically with how to switch from C++ to Java. http://java.sun.com/docs/books/effective/
Get the source code for the JDK and look through it. The collections classes are well-documented (again, by Mr. Bloch) and interesting to read through. A few other projects seem well-written, like the google collections and jgoodies bindings. Reading through the source code can be fun and informative.
Get a good IDE like IntelliJ, and pay attention to the little warnings it displays about your code. I've learned a few things just from the refactoring suggestions it pops up. Plus, Java (being typed) is really ideally suited for a powerful IDE, not like scripting languages.
Have fun!
You drank my drink, you drunk!
2: I can only see one reason why programmers may want to learn Java -- they are weary of C and so are their employers are. On the desktop, Java is still slower than native code; in a client-server configuration, you still need a Java client. Server side, I see no reason to favor Java over PHP or Perl, both of which can be easily converted to byte code, like Java is, and are simpler and more intuitive than Java. It's true that one can write Java code once and than easily adapt it for multiple platforms. Speaking of which, Java has limitations on MS Windows imposed by MS. So if your are a Java programmer you are probably developping small to medium size applications for the enterprise, most of which would be probably easier to create in Perl. Am I wrong?
Core Java vol. 1
Core Java vol. 2
Core Java Server Faces
Those will get you off to a good start for desktop & web development.
Plain old java is easy, imo. My skills are lacking on the web development at the moment because, to be honest, a lot more goes wrong for seemingly no reason compared to other languages but I shall persist as there are more jobs for that side of java and I can leave the desktop app side as a hobby or for making little tools at work.
Considering that Java has been (probably) the most used language for a while, you get a lot of crap. So, here's my "crap filter" list of what you should learn to really hop into the JVM ecosystem.
Books:
1. Effective Java, 2nd edition, by Josh Bloch
This covers most of the twists and turns of the basics that an experienced programmer would need. I wouldn't worry about getting a simpler book.
2. Java Concurrency in Practice
Understanding the JVM model of concurrency is important, and this is the only guide that had a pretty in-depth look into the subject. The Sun documentation absolutely sucks at covering concurrency.
APIs
1. Guice http://code.google.com/p/google-guice/
Dependency injection is the most recent thing that makes Java a very powerful language for building large appications. And Guice is by far the best implementation of DI. (Yeah, you could learn Spring, but I just don't care for it.)
2. Hibernate http://hibernate.org/
I hate Hibernate. But it basically set the standard for EJB3. If you know Hibernate, it's not a very hard road to learn all the other "enterprise" crap.
On the other hand, any substantial server-based solution probably uses a ORM solution like Hibernate.
3. Apache's Commons http://commons.apache.org/ and Jakarta http://jakarta.apache.org/
There is a ton of projects under the Jakarta umbrella these days. The first one to try out is the commons-lang libraries, which provide very easy to use toString. equals, and hashCode implementations that are 'good enough' 99% of the time. Why do you need those? Read Effective Java. :)
Interesting stuff:
1. Hadoop http://hadoop.apache.org/
Hadoop is an open-source implementation of Google's MapReduce idea.
2. Scala http://scala-lang.org/
Scala is my favorite "non-Java" JVM language by far. For me, the scala interpreter is how I learn APIs. In fact, most of my new code is in Scala, not Java.
3. Groovy, JRuby
Just some more used non-Java JVM languages. I've used JRuby a bit, but have moved on to Scala. It's still a significant project, however.
4. Web application frameworks: Wicket http://wicket.apache.org/ + Databinder http://databinder.net/
Wicket is the simplest page-based Web framework I've ever used. I just find it easier to navigate than Rails. If you really want an ORM-based solution, go for the Databinder extensions. Databinder will get you coding in a couple of minutes.
5. Restlet http://restlet.org/
We have several different clusters, and a bunch of machines that need to transfer data around. I learned how to set up a restlet server that was integrated with Guice in a couple of hours, and now, have a very easy means to script together many different servers.
Ruby, Python, etc. have been growing a lot faster than Microsoft development.
C# has a lot of market share, but others have been catching up.
Ruby has been going crazy. Jobs programming in Ruby and Rails are in demand and pay well.
All these buzzwords you're so afraid of are just libraries. You're asking how to learn them, but the answer is: you don't. For each library that you have seen mentioned, look it up and find out what it does. For each library that you consider important, download it, do a "hello world" project with it, and skim (don't read) its manual. Then, when you actually have a project for which you need it, lean on the reference material you keep handy. Memorizing APIs is a waste of your time, because there will be always better-but-different ones tomorrow.
Interesting! How does it compare with IntelliJ IDEA?
I'm currently stuck on IntelliJ ver 5.1, though I used IntelliJ ver 6 for a while. Sadly I don't recall much about the IntelliJ 7 demo I tried].
I'd say NetBeans 6 is better than IntelliJ 5, and probably around as good as IntelliJ 6. Plus it's free, which is also good. I'm no NetBeans zealot as I'm still getting familiar with it, but I'm liking what I see (save that slowdown issue I mentioned).
The only thing I don't fancy about NetBeans 6 is the way they handle the User Libraries (or perhaps I haven't figured them out yet). While other IDEs let you setup your Global Libraries in a similar way (where you make your own segmented list of Libraries you see yourself using) it appears NetBeans 6.1 allows you to add to an existing list. So instead of a lean Library list that has only what you use you get some other stuff.
I'm still pretty early into NetBeans but so far it's looking pretty good. Assuming I don't find a bunch of things I don't like I might start using it at work.
As I mention, it does start slowing down at work when I start modifying code while in run/debug mode (for a long/large process) so that is annoying, then again I probably shouldn't be doing that anyway. Also so far I've only noticed that problem at work, which has a slower Intel CPU (SingleCore). At home I have a fast rig with dual cores.
Well I'm off to uni in about a month, and I need to know Java for that.
I've been using Netbeans IDE, and I've been reading Java How to Program by Deitel.
ISBN: 978-0132222204
It's an expensive book, but if you can get one second hand it's not too bad. If you don't know any Java at all, then you don't necessarily need the latest Edition. I'm using the 6th Edition.
I only have VB and basic PHP knowledge, so I'm probably not the best person to give advice. But that's the book that uni recommended for people who have a good programming experience.
I'm a leaf on the wind, watch how I soar...
-Lucy-
After learning the language basics I'd jump into web programming.
The web programming part is hard though because of so many choices.
We decided to go with:
Spring + Hibernate + GWT (and some JSP) for front end work
I'd suggest going the Spring/Hibernate path for starters because its pretty simple.
The UI part is the weirdest. The frameworks I like today are GWT and Wicket. But Wicket doesn't seem to be used by so many people just yet. GWT is very nice.. but it has a single page paradigm and is all client based which can sometimes be a problem (we got around it by using it w/JSP). JSF and Tapestry are horrendously complex (especially compared to ASP.Net which is nice!).
JSP (2.0) is a good fallback if in doubt.. you can build components with it and all servers support it. But there isn't a good component market place for UI stuff.
Aparently lots of people still use Struts.. very old school in my opinion.
back in '00 i needed a crash course in java, none of the books i read offered a decent understanding of the way things 'really' work. eventually i came upon a site offering a pdf named 'learn java by association to visual basic' or something like that - for around $10. from there i was able to rewrite a product that was left a mess after several developers had their way with it. the new version worked, it was clean, it had no bugs, but it was very slow. after several months of tinkering i came across a powerful java debugger that helped me learn about java 'plumbing' and how variable declarations and subroutine calls eat up cpu and memory. i'd recommend going that route, using either notepad, jbuilder or netbeans (or all three). with that knowledge you can then choose the add-ins to experiment with, you'll surely have a good understanding of what's going on under the hood by then.
Try Wikipedia, it has articles on each of the things you list and lots more. Unlike projects' individual sites, it tends to start by telling you what each actually does. Most of them are hardly earth-shattering, it's just that Java developers seem to like assigning a silly acronym or coffee related name to every equivalent to a CPAN module.
Did you ever developed anything in j2EE?
Math is beautiful... e^(pi*i)+1=0
The tough part is in navigating the huge frameworks. Be it STRUTS or another MVC, then there's all sorts of add-on stuff to learn. Then there's the whole WebSphere or Weblogic administration, tuning thing. In short, you can't learn it all in a timely fashion.
A agree with another poster that a superficial skim of a library or framework is probably sufficient so you have a basic understanding. In the end, you won't know which one to study until you have a project.
If you are on-shore USA, then you'll probably not want to be a Java developer, but a project lead, analyst, or integrator. Those are customer or business facing jobs at the interface that are difficult to outsource but require people skills and in-depth knowledge on troubleshooting and delivery.
As for me, I'm going back to coding in Prolog. It rules.
Personnally, I find these two books very well done, even if they are very different:
- Java Head First, O'Reilly: full of diagrams, ultra clear explanations; for the very beginner;
- Introduction to Java Programming, 6th edition, 2006, Daniel Liang, Pearson-Prentice Hall:
you can be mislead by the title as it is less introductive than the Java Head First. Covers everything from Hello World to multithreading, JDBC, applets, servlets.
Good luck.
Orfeo
First: (as several have said) Ignore the people saying "don't". They have no idea what they are talking about, most are trying to sound cool and probably have no experience from the world of large business systems. A good programmer chooses language based on the problem at hand, not based on what is cool.
.Net, because both platforms are proven, reliable and *scalable*. Few serious programmers would think of building a large critical 24/7 system in Python or C or whatever. Sure it's possible but you're in for a world of pain when you try to scale/maintain past a certain size and complexity.
There is a reason most large enterprises only deploy in either Java or
that said, many are recomending books on the java language, but you asked for what to do after the language. My advice would be serlvets-jsp-jsf-ejb3, in that order. With servlets you understand the core of all java frameworks, and jsp pretty much the same. After that, you have JSF, which *will* replace struts/etc eventually. JSF borrows heavily from struts but improves on it and is an official standard.
There are several frameworks that build on and extend JSF, like JBoss Seam and the like, and you probably cant learn them all. Stick to basic JSF until you get the hang of it, and then you can try out some of the stuff based on it.
Last is ejb3 which is needed for really large apps when scalability and redundancy is critical, but seldom used otherwise.
Since you're, like, familiar with 10 bazillion technologies, I'll just save you an afternoon of reading on Java. The other stuff should be blatantly obvious to someone like you:
1) Don't waste your time with lightweight web stuff in Java. There's a reason PHP has eaten up that market and taken it away from Java. No Java Webframeworks.
2) Don't attempt any intense multimedia stuff in Java, unless you want to learn the plafform independant specifics of Java in that area. C++ still rules that game.
3) Go to Netbeans.org, download Netbeans, turn on all the code hinting and start coding away. And just so you know: I use Eclipse for most of my non-Java work, but I still find Netbeans the supperior IDE for doing Java stuff. And Swing has greatly improved in the last 2-3 years.
We suffer more in our imagination than in reality. - Seneca
I think Netbeans is the clear leader now. Eclipse won't go away but I find Netbeans to be much better now.
I just hope they don't bloat the hell out of it while adding in Ruby, PHP, Python related stuff into the mix.
Tate is now a RoR fan, but his take on good Java coding is a nice read. The book itself won't tell you how to code Java syntax, but it really underscored a lot of things I'd learned myself. In brief, whatever you do with Java or other languages, listen to your instincts when vendors and "architects" start pushing high falutin', sea-going, top heavy "solutions" on you. Yes, IBM, I'm talking to YOU. In fairness some architects are OK guys. But watch out for the ones that make simple problems complicated. Complexity should come from the business problem you are solving, not from wrestling with a framework to retrieve a string from a database ;P
pick a small (but non-trivial) problem. solve it. now make the problem a bit bigger. solve it. repeat until you're either sick of the problem (in which case you need a new problem), the problem is too big, or you've run out of problem.
i really like little toy artificial neural networks as a starting point for learning a language: i've got a really great understanding of the algorithms involved, the data structures tend to be fairly simple but not trivial, and the algorithms exercise a lot of the various control structures. once the core is done, it's time to look at improvements: refactor hand-written linear algebra to use standard packages, maybe add a nice gui on top to display statistics from the k-fold cross-validation and give some visual clue about what went right/wrong, etc.
I hope this helps. Those are all skills that will be valuable in todays programming workplace.
Basically assuming the environment (ie plugin host) is nicely written the all the boring nut and bolt stuff should be taken care of, if you can find a well supported java application that uses plugins go for it!
That means you can have "fun" while you learn which is the quickest and best way to learn
I'd highly recommend the java "trail" tutorials, and once you get you're head round the API the api docs are extensive, more than learning a language (which is just really a C type sub set) you are learning the JVM's environment.
Use a text editor for writing code and dont rely on multiple guess itelli"sense" type IDE's
Enjoy!
there are thousands of windows applications that don't work on Linux - thankfully
jeez... Who modded you insightful? The Java platform today is an enormous pile of layers, frameworks, and standards. It's not just Java/EJB. Learning the entire JavaEE ecosystem is more than most people are capable of. And yes, I have worked with both C++ and the JavaEE stack.
Write some cool Eclipse plug ins! While the learning curve might seem steep at first sight, it's cool, good practice and might just be a nice competitive skill. Everybody "knows" Tomcat etc. This might be a good opportunity for differentiation (not too exotic, though, either).
When I first started learning Java, I dabbled with the Robocode project, developed by IBM. It taught me how to review APIs, use libraries, got me familiar with using an IDE, and also familiarized me with several of the basic programming methods and constructs within Java. And in the end it was kinda fun because I had a Java "Robo Tank" that could hunt down and kill all of IBM's tanks. Good times.
I've a game dev who hasn't touched Java in a decade.
Looking at Java it seems there are three ways to write the UI for an application:
-AWT, the original cross platform wrapper to native look and feel. Obsolete? No new applications should use AWT?
-Swing, AWT replacement that draws stuff on its own instead of using the built in widgets. Completely portable, but will have subtle differences with a native app.
-SWT, the even newer toolkit from Eclipse that uses built in widgets. Not quite as portable as Swing, but can be made indistinguishable from a native application on a supported platform?
Is that a reasonable summary of things today? So if I wanted to write some applications, mostly for the sake of learning, and only cared about Windows, OSX, and GNU/Linux I should use SWT, right?
That way, you get to JDBC just after you have learnt the object structures that enable you to do the necessary level of ORM to build efficient applications with storage. Now with I/O, you can build simple but real applications.
From scarped cliff or quarried stone she cries "A thousand types are gone, I care for nothing, no not one."
Compared to some other languages, Java is pretty limited in what abstractions can be practically implemented,
Like what? Name anything and Java probably already has a library for it. Java is just as flexible as anything these days, and wether your thing in running Ruby on Rails on top of the VM with some Java through in the backend or some functional Groovy work Java has options.
That's a big advantage it has going for it, so many people have used it now there are a lot of resources and options for wherever you might want to go with it. Even if you decide to use other languages learning Java just to understand how to use it as a base is really worthwhile, and because of the platform neutral architecture and excellent community standards body (JCP) as a platform it will continue to thrive.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Setup
Java basics
At this point, most of the foundation in Java's structure should be clear. Now to pick up some of the fundamental classes available:
Then depending on your needs, start looking into the following stuff:
Now that you have most of the Java core under your belt, you can proceed to other frameworks. Each framework will probably take considerable time to learn. For example:
Advanced java core stuff (not really necessary until you need it):
Yeah. I would say that is a fair road map.
I have a related question: how to get started and learn about Java EE? I found it incredibly difficul to find my way through all the technologies and acronyms. And more importantly: i found it extremely hard to figure out what to use why when.
There are many versions and many kinds of frameworks, often doing similar things and it is very hard to decide which ones to give a closer look.
This is especially relevant when one tries to figure out why to use which of the many frameworks to quickly get a web application running.
Are there any good online tutorials and online introductory articles that are up to date? (many articles by Sun and other sources seem to be too dated to really be a good basis for what to look into now).
1) Slect you favorite type of beans.
2) Grind beans to the desired coarseness.
3) For a common electric coffee maker, wash coffee pot thoroughly, insert clean filter into brewing area, and replace pot under the drip.
4) Add the desired quantity of ground beans to filter.
5) Add water to reservoir.
6) Turn coffe maker to "ON".
Knowing Google's lust for data collection, the Soviet Union is still alive and well inside the psyche of Sergey Brin....
You're right that "Java" covers an enormous range of technologies nowadays. If I were you, I'd start with where Java has taken hold the most - the server. Learn straight Servlets and JSP using something like Tomcat. Then start to branch out into popular frameworks like Struts2/Spring. At that point you'll understand what these frameworks are actually buying you; something a lot of folks today don't get. After you're comfortable in the webapp world, you can start looking into ORM stuff like Hibernate, and if you're interested, full on J2^HEE using say JBoss. But be advised that the general trend with Java seems to be away from things like EJB on the big app servers, so make sure you're investing your time learning the right things.
"The problem with internet quotations is that many are not genuine" -Abraham Lincoln
You could just stick to Java 2 Standard Edition (the base language and API) and Java 2 Enterprise Edition (the API's for database and web development basically).
For J2SE the choice is easy: just use the latest you can download from java.sun.com. You normally only use other implementations if the have specific benefits for an optimized implementation.
There are many other frameworks from web based designs, but the latest editions of J2EE have heavily borrowed from the most successfull ones. And Sun is, in my opinion, generally pretty good in making understandable, easy to use API's. GlashFish is the reference implementation, just use that for starters. If you are, as you say, a jack of all trades, you will learn other frameworks as needed.
You can use Netbeans (available together with the J2SE distro) or my favorite environment Eclipse for development. You could start with the command line tools with J2SE for discovering the compiler and JVM, but after that you will want to use a good IDE. Java's syntax was specifically created to make good IDE's, you will be largely missing the point if you go without refactoring support, searching for Java elements though projects etc.
Other important things you will want to know about:
- JUnit testing framework
- Ant building framework (cross platform XML makefiles)
- The JavaDoc and JAR tools
- Static code checking (e.g. checkstyle)
The most interesting thing to begin to understand when you start is how the classpath and classloaders works, so read into that. Another good hint is to understand how you can code in a secure fashion (use "effective java" for that).
Have fun!
I used their book back in the day in my CS courses. Good reading for a starter book.
http://www.deitel.com/Books/Java/JavaHowtoProgram7e/tabid/1191/Default.aspx
~~ Behold the flying cow with a rail gun! ~~
I really really tried to like Netbeans, but had to change back to Eclipse since, when we imported our application, Netbeans would not only crash(while attempting to parse the source), but give false compiler error messages when encountering some of the more advanced usages of generics.
I don't need to test my programs.. I have an error correcting modem.
For web development I would recommend the following course of action:
a) Download Tomcat and start with writing some servlets. Nobody uses raw servlets these days, but the at at the foundation of Java web technology. Understanding at a primitive level of servlets lets you understand what has been built on top.
b) Not sure of the order here, so I would look at Struts and Hibernate and Velocity about the same time. These technologies deal with totally different problems. You might also want to look at EJB and JSP, but personally I prefer Hibernate and Velocity.
c) Most software shops will also make use of infrastructure projects such as Ant for building, JUnit for automated testing, and perhaps Cruise Control for continuous integration. Oh, and obviously you should be familiar with SVN and CVS, two popular version control systems.
d) Finally take a look at Spring, which is becoming increasingly popular.
Finally some advice; at the end of the day the value to the client is the most important thing. Many of the above projects have resulted directly from problems Java developers were facing. With that in mind make sure that you don't just use all these technologies because they are flavour of the month. Each has its place, and sometimes the overhead in using them isn't worth the effort.
It is a good idea to at least study what is available, but don't try to learn everything. Target a specific stack and perfect your skills with it.
So ignore this guy.
C++ programmers diving straight in like that make shitty Java programmers. Make at least a reasonable effort to learn Java and it's idioms - has a very different culture around it from C++. Java is (shrewdly) designed to look a little like C++ but that is superficial. C++ -> Java is more like Perl -> Python.
${YEAR+1} is going to be the year of Linux on the desktop!
No doc comments!
You can use this link: http://www.javapassion.com/ it's very useful, just follow the steps.
For the "why and how" of using the Java libraries, I think Sun's own tutorials are a good starting point. They don't cover all technologies, but they provide pretty good coverage of the core set of libraries, complete with sample code. And they are regularly updated, easily accessible and free, which is more than can be said for the typical Java introductory book, which doesn't contain that much additional information.
You are right that the API docs don't provide this, but they are not intended to. In places they do link to the tutorials, although it could be more frequent. Actually I think good documentation is one of Java's strength; immeasurably better than MSDN and quite good compared to, for example, the Python documentation. They lack the elegance of Kernigan & Ritchie, but then Java is a more complicated environment.
But I admit that there are gaps. For example, I don't think Sun's tutorials describe how to define a custom event, although these quickly become useful if you do more than very basic GUI programming. Of course you can always Google for these.
As for topics to start with, it's been a while since I started to learn Java from a C++ background. I agree that the step is not that big, but it's worth devoting some time to the mechanisms of event handling, multi-threading, and the Collections framework. These are too important to skip, and may hold a few surprises.
I suggest you look up Java with passion - great free courses on basic java and more advanced issues.
Java credentials are mainly about the standards. Become an expert in the J2EE standard, the OCAP standard, the J2ME standard, or whatever the latest big Java servelet standard is. Java was originally pushed as platform independance, but now is being pushed for its standards base.
O'Reily Head First Java is an excellent book if you want to start Java from scratch.
I agree that Head First books looks immature and funny, but the Java version is really good.
I read the Head First Java book 'after' passing SCJP certification and I was surprised to realize how many core concepts I didn't know and how easily I understood some of the concepts which I was struggling with before.
The 'Java Tutorial' from the Sun is also good. You can read it online too.
As a first year university student, whose never done programming, I can highly recommend "Java Foundations" ( http://www.amazon.com/Java-Foundations-Introduction-Program-Structures/dp/0321429729/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1220308826&sr=8-1 ) as a reference point.
It explains everything very clearly, and is well laid out.
read "Structure and Interpretation of Computer Programs" by Abelson/Sussman. then read "Common LISP, the Language" by Steele. if you are really shure you need Java after that, it's maybe your own fault.
I came from a very similar background to you. Also I had not done Computer Science, so when I had to learn, I was very much at the mercy of whatever was out there.
(1) I used Sun's own course material (I didn't go on the courses, just went through the CDs
(2) Downloaded the J2SE and the J2EE (includes JDBC and the Servlet API), and MySQL
(3) With the help of some O'reilly books, began developing my own servlets.
This path got me started in the basic language, as well as the basics of some important APIs.
Once you've reach some confidence with the above, get fancy and download Spring, Hibernate etc.
Eclipse is what I use as an IDE and Maven 2 for project management, but y'know, hoses for courses.
"Laugh while you can a-monkey boy!" - Dr Emilio Lizardo
starbucks, naturally
With your C++ background you should find java syntax intuitive. Your biggest challenge will be learning the standard library (Java SE SDK or simply JDK in Java parlance.) It is big, considerably bigger than the C++ STL, but it is also fairly powerful.
My advice, as someone who has walked a similar path (I have been programming professionally for about ten years, and using java for the last six):
1) Download Eclipse. It is the most popular IDE, and it is free. If you are going to look for a job you are going to want to know how to work with it.
2) Go on Amazon or Safari and look for a good core java book. You need to find one that suits your style of learning. I don't know what that is so I am not going to recommend a specific one.
3) Focus on core java. Don't worry about Java EE yet. You want a good foundation in the core language and common APIs. Don't spend a lot of time on IO or Swing for the same reason.
4) Read the job boards. When you find a position that looks interesting lookup the specific buzzwords they mention. Look at documentation, sample code, and API docs.
i want the exact same thing for Flash and related technologies.
Not all, but for the most part Java developers are light weights.
Mention a register and they turn into fluff - like a dandelion that a 5 year old blew on.
But then again, why not?
I am very small, utmostly microscopic.
"I mean, what is the curriculum required for someone to say they are a solid Java developer?" Unfortunately, the credentials that you need to say that you are a solid Java developer do not come from having read a set of books. Experience, in my opinion, is the only thing that really counts. If you're looking to gain some experience (and something to put on a resume) perhaps learn the core language, then learn an open source project. Learn it enough that you can contribute to it. Maybe write some documentation, make some bug fixes, add features. It will take time, but eventually you'll gain the experience and credentials that I think you seek.
Oh, and learn what IoC is first.
Isn't IOC the governing body of a sport competition that happens every four years and just happened in Beijing not too long ago?
Start with
This book...
http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1220317912&sr=8-2
Learn these libraries...Apache Commons:
http://commons.apache.org/
Learn Spring http://www.springframework.org/
Forget Hibernate, learn Ibatis http://ibatis.apache.org/
Learn Ibatis (forget hibernate)
http://ibatis.apache.org/
Learn Liferay
http://www.liferay.com
Learn ICEFaces
http://www.icefaces.org
Enjoy life! thank Jesus! Vote for McCain!
1) Download and Install JDeveloper
http://www.oracle.com/technology/software/products/jdev/index.html
2) Think of a project to code. For instance, write a program to snag web pages and store them in a database.
3)Code
4) Read "Thinking in Java"
"God fights on the side with the best artillery." - Napoleon, Marshal of France - speaking truth to power
Considering the list of languages you already know, picking up Java should not be a big deal. Two books I suggest (either not both) Head First Java, 2nd Edition by Kathy Sierra and Bert Bates Learning Java by Pat Niemeyer and Jonathan Knudsen As far as an IDE, I prefer Netbeans. Version 6.5 is coming out soon and will support many of the languages you have listed (C/C++, Java, PHP, Ruby,...) As for other things to learn? Both books above cover enough got get you going. I would suggest Swing (which is easy in Netbeans using Matisse), JSP, Hibernate, Maven (which is supported in Netbeans), and Webstart (which is supported in Netbeans). Eclipse is also very good but I do Swing development so I tend to favor Netbeans. There is a huge community out there that can help you learn. java.sun.com has many tutorials per topic and netbeans.org has many text and video tutorials on how to use the IDE. Not to bad. Start simple. Read through the books and learn the general structure. The rest is just learning frameworks.
Comment removed based on user account deletion
Starting fresh? Consider the grandaddy of 3-tier, a set of frameworks, app layer, etc. that powers iTunes and lots more...
http://www.apple.com/webobjects
It works for me!
- Ubique, Tom Termini www.bluedog.net - WebObjects / J2EE SOA / iPhone solutions for knowledge workers
When i started up on Java in 1997, i used the first edition of Java, The Complete Reference by Herbert Schild and Patrick Naughton.
Nowadays the Naughton name does not come up as he was indicted on child porn.
But his book remains the gold standard.
Try that.
Apart from that, study the specifications well.
Java is all about specifications. Learn the limitations and you will go a long way.
"Doing what i can, with what i have." ~ Burt Gummer
Wow, what a load of advice to launch into frameworks, buy books, get certification etc.
Start with what's authoritative, basic, and free. That's the Sun Java Standard Edition tutorials
http://java.sun.com/docs/books/tutorial/
Or download from:
https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=tutorial-2008_03_14-oth-JPR@CDS-CDS_Developer
The web and persistence frameworks are important. They're over-engineered and I hate them but if you don't know them you won't get work. (Without them it'd be very much like trying to become a game developer knowing only ANSI standard C and no frameworks). They're what you need to learn second. Possibly on a smaller project where you're not the lead. However learn to crawl before walking or flying.
These posts express my own personal views, not those of my employer
try java.sun.com and click on the learning link.
also use netbean for codding it realy helps
PS. Why dose slashdot require www. at the start of urls thats realy stufed up
null
I worked in Java for a year while only skimming the surface. It wasn't until I started interviewing for Java jobs that I realized how little I knew about Java.
Most recently I transitioned to working in Ruby on Rails. After seven months, I really feel that I'm only 60% into Rails.
It's not just Java. Having a reasonably complete knowledge of architecture and technologies related to multi-tier web applications takes time. There are complexities that are in common with all of them.
For me the biggest benefit came from signing up for extension courses at the local college. It let me get some depth and formality, and bypass the "old" Java tech that's not really relevant to modern Java. (Can you say "EJBs?")
Everyone who doesn't get java (like myself at first) thinks java is too much to learn, j2ee is a burden and all. Even when I've been programming for 15 years.
After having to "deal", for 3 years, with a legacy j2ee system, all I've done is basic stuff.
I've learnt to: setup/migrate tomcat, deploy shit, what are war/ear packages, "optimize" pure-jdbc queries by changing shitloads of Statements to PreparedStatements, optimize CallableStatements and such.. Then got bored, picked up hibernate in a month and saw the light with spring.
It's a bunch of xml files you have to deal with. It's more like an architect job sometimes.. and it's all too easy.
My advice? Know Design Patterns backwards. Know your systems. Design stuff and re-implement them each time you "feel it's dirty". That worked for me. :-)
After you've seen a lot, the "best programmers" aren't all that good of a programmer, but they know how to elegantly put stuff together. The _very best_ programmers I've seen could only write one-liners or optimize to oblivion with their shitty-ass-spaghetti-code menace.
ant or maven2
servlets
hibernate or ibatis
springmvc or struts
jakarta commons logging
junit
tomcat
svn or cvs
eclipse or jbuilder
____________
nothing else is required to make the generic boilerplate application. key things to ignore if anybody tells you otherwise:
- you don't need an application server, you need a servlet container. application servers exist to make companies money - they do nothing for the client.
- avoid portlets. they exist to make companies money and provide nothing for the client.
- avoid anything with phrase service oriented architecture in it. it exists to make consultants money and provides nothing for the client.
- avoid anything oracle, and to a much lesser degree ibm related, unless it's a database. and even in the case of databases - you're better off with free alternatives 99% of the time.
- if something has the phrase "business" in it - it means it doesn't really work. a classic example is "business intelligence" and be wary of acronym's with a "b" in them - like bpm. "business" gets put in terms to sell things to point haired bosses who mistakenly have been given access to money.
on an unrelated note, if anybody wants to purchase my new brand of toilet paper, business toilet paper, send me an email. it's 10 dollars a roll and soft enough to service a bull.
Then go on to specialization areas after you feel comfortable with the overall language... like thread with Goetz's book, or maybe generics... if you need more help with Java and are comfortable after Head First, then try Effective Java, an excellent read. Good luck!
Spoken like someone who has never tried Eclipse (free), much less IDEA (commercial). Basing your opinion of Java on your experience with NetBeans is like editing C# with Word. And yes, I use the free Visual Studio to write C++ apps for XP 64 bits, not a bad product at all ... still, no Eclipse! In customization, code generation, incremental compilation, compile error fixing, formatting, debugging, you name it, Eclipse is leaps and bounds ahead.
The Java Tutorials are practical guides for programmers who want to use the Java programming language to create applications. They include hundreds of complete, working examples, and dozens of lessons. Groups of related lessons are organized into "trails".
http://java.sun.com/docs/books/tutorial/
Good luck.
dial@no-log.org
Here's to separating all your layers (Persistence, UI, Controller, Service, etc).
I'd choose Wicket for web-dev since it follows a Swing Type model and closely resembles it.
Wicket, which you could learn concurrently with Swing.
Hibernate - handling your persistence (or any other OR mapping tool) - since you say you are clued up with OO-thinking. I'd recommend ActiveMQ if you are doing messaging-related stuff.
Spring would also be brilliant IMHO to piece all your stuff together (Service, Persistence, Business Logic, etc).
hmm why dont you start here: http://docs.python.org/dev/tutorial/index.html
RMIT offer a several subject on Java through Open Uni (Australia) www.open.edu.au that can be accessed anywhere in the world. The units are about $700 and the first is based around Savitch - Absolute Java. The advanced unit uses one of the Liang books... http://www.prenhall.com/liang/ Java is a great teaching language. It's the warm up to other things. Despite learning it I'd really prefer never to use it. Here is hoping Jaxer takes off! Yani
Swing is important for graphical user interfaces - for both applets and standalone applications. Tomcat and Java Server is useful for creating dynamic web pages (JSP and Servlets).
I don't like using either of them, really, but they're pretty much the more important and useful things you can learn in Java. There are also plenty of other useful libraries out there (learning to use JDBC, and Hibernate, is good for databases).
I am not devoid of humor.
The best way to start to know Java is:
http://java.sun.com/docs/books/tutorial/
I would suggest starting to learn about Java with normal text editor and command line with the examples.
Once you understand how things works, then learn how to use the IDE.
I have seen so many people start with IDE and then get themselves confused.
Second thing to learn is to learn how to read API:
http://java.sun.com/j2se/1.5.0/docs/api/
With this 2 basic foundations, learning the various J would be easy.
You can learn Java for free as well. You will want JBoss (J2EE container) bundled with Tomcat (JSP/Servlet container) plus Eclipse (IDE) and the J2EE SDK (from Sun). It is all free. Sun has packages with all components integrated, but you will get Glassfish (which almost noone uses) instead of JBoss, and Netbeans instead of Eclipse.
If you understand OOP then the specific language you choose is just wallpaper. All you need do is build your familiarity with that language. It's just different ways and words to do the same things. Once you get a grip on the libraries then, if you're any kind of decent programmer, you shouldn't have any trouble.
www.springframework.org is a must - there is over a year's worth of learning in this suite of libraries. This, more than any library affects good coding practices. It's an outright replacement for EJB. It successfully implements AOP but few of the negatives. You just get more work done while simultaneously future-proofing your code.
jakarta.apache.org - there's a year's worth of learning in these libraries. commons-logging, commons-beanutils, commons-digester, commons-codec, commons-dbcp are just a few of the invaluable libraries.
hibernate.org - This will take a long time to MASTER. There are tons of bugs and use-cases that it just handles poorly. But this plus a mix of either raw JDBC (which I don't recommend) or spring's JdbcTemplate provide for a very elegent combination of DB accessibility. The biggest advantage of hibernate, in my opinion is that you can break the problem down into a series of layers, and work on each layer independently. Caching, delete-cascades, object-oriented design, filtering, event-processing, message-pasing, static-queries and OOP-queries.
http://www.opensymphony.com/quartz/ - I'm not crazy about quartz - it doesn't do things the way I'd like. But it's one of the better scheduling systems for Java enterprise.
tomcat and or jboss and or glassfish are a must. You're not very useful without a FULL understanding of how to setup (and this means clustering, fail-over, session-replication, session-server-pinning, apache-front-ending (to support server-pinning and static-file off-loading)). Learning mod_jk (which I hate in many-to-many server-to-application configurations) AND Apache 2.2's mod_proxy_http (which I love). Learn everything there is to know about deployment. How files get stale.. Where different log files end up. How to configure logging on the fly.
Learn Java's JMX, to better understand how to work with long-running java processes. Jboss makes it easy, and tomcat makes it available.
Learn Eclipse or other major editors (can't vouch for netbeans but I hear a lot of good things). IntelliJ's IDEA is a great (but expensive) commercial editor. This is what really differentiates Java from other languages. There is almost nothing in the language that can't be analyzed by the editor. Since Java is strict (except for reflection), it is very safe to do multi-thousand-file variable/method/class renames, safe-deletes, etc. With annotations, most of the meta-programming has started going away - meaning some things we use to treat reflectively directly in code are now handled by 3'rd party tool-kits which have you place annotations in your code to mean special code-flows. The advantage is that if your editor is aware of those 3'rd party tool-kits, then it too can analyze your code for those annotations.. Hibernate 3.3 is a great example. My editor checks DB column names, types, constraints in real-time based on the annotations. It can investigate the HQL (Hibernate Query Language) and spell-check column names - purely based on these higher-level annotations. All you need is an active community to keep such 'magic coding syle's well understood by the popular editors.
Definitely learn DB transactions inside and out.. Learn how to avoid race-conditions. How to avoid dead-locks. How to perform optimistic locking, how and why that's different from pessimistic locking (this isn't a java thing, it's an enterprise DB thing). This does require postgres or INNODB in mysql instead of MyISAM, however. Learn how to write code which has as few inter-dependencies as possible, to support high volume concurrent programming.
Learn to program with as little static (global) variables as possible. Learn how mentally identify regular non-static fields as globals. Namely if two threads can see the same field, it's a global - plain and simple. Learn how to code to MINIMIZE synchronization constructions - this minimizes dead-locks, and speeds up code. Note a dead-lock is a bug in you're code; just
-Michael
The only reason someone would recommend java is due to either incompetence or corruption. Java was popular about 5 years ago, mostly because university 101 courses taught hello world in java.
in the real world, university grads push for java because they want to re-use the code from their senior year project. PHBs used to like it because it was a checklist item.
PHP programmers can code apps that are fast, secure, and easy to maintain in a fraction of the time required by java. They also don't create the legacy of needing a cluster of 4 servers to run a simple app.
Fortunately the PHBs are now into PHP, so Java will soon die (except for the old machine I have over in the corner running Azureus BitTyrant)
A good place to start is to just do some hands-on experimentation with NetBeans IDE. Go through the tutorials and you'll be creating java projects in no time. Then you can figure out how you like it and what else you'd like to do...
Nothing is passed by reference. Everything they call reference is a pointer passed by value. Any object you declare is a pointer (just without the "*"). Coming from a C++ background, as long as you treat everything as a pointer in java (except the few native types that are not inherit from Object), than it will start to make sense for you.
Comment removed based on user account deletion
Why learn another dead (or what should be dead) language?
Dispite recent improvements, Java is still slow. Now because of all the offshoots, it is not very portable either.
It's not worth the support you need to keep it all running either. You have to fix it every time a new version of Java comes out.
Don't even get me started about the Java-fanboys. They are more rabid than the Mac ones. They have so much invested in working with Java they can't see the writing on the wall. Just try to sit down and have a rational, point by point discussion with them. There isn't a one of them that won't get frustrated and start ranting.
Java will always be with us - just like Cobol. We are stuck with it. But it doesn't mean we can't have to continue to use it for new projects.
... my dog would program in java (honestly, it is that clever).
Somebody talking about something he does not know only manifests his ignorance (but no worries, the Internet is anonymous: nobody will find out).
Jeez ....
IANAL but write like a drunk one.
Learning Java is nothing.
Learning all the skills around Java technology to build a career path (which is what the poster is actually asking) is a completely different kettle of fish.
No wonder chaps in India (hello guys! Regards to Mumbai and Chennai) are eating your lunch.
IANAL but write like a drunk one.
go to http://oreillyschool.com they have a new course on Java using Eclipse that should help.
You'd think a programmer would be able to express themselves precisely and with concern for how their statements are grouped. Let me ask - do you often have transitive logic bugs? Is if a || b && c fantastic?
Comment removed based on user account deletion
This is what i would do, and it isn't all encompassing or all-wise by any means.
I'm not sure exactly how much you know about the underlying layers of how a web application works, and it sounds like you would do mostly web development.
I would start with a cheap book(6.95 used) off of Amazon called Java Server Programing(Red book). Only read the information chapters that discuss design and structure to get a good feel for how Java Servlets, Java Server Faces, Java Beans, etc.. work. This all depends on what you'll be doing exactly. Java has it's hands in EVERYTHING WEB, so knowing what you want to do is key. I assume you're not doing any xml server parsing(who would want to :) ). Get both Java Core books from Sun. Go through as much as you can stand. Build some very simple servlets and then look at Tapestry. The reason I say Tapestry is because it's so awesome different than anything else.
Learn ANT and Maven(Related). Learn JDBC then go to Hibernate.
The real skills only come from experience so build as much as possible.
Books to see in order:
Core Java from SUN
Java Server Programming(design stuff)
XML
AJAX
Ant
Maven
Tapestry(POJOs)
Javascript
Hibernate
Spring
2 cents
The more you learn about design and Core Java(Objects, Inheritance, Data structures, JDBC, security, etc...) the more robust and scalable your web apps will be.
Go to http://www.coreservlets.com, or http://www.moreservlets.com, and read up on Marty Hall - he wrote the book on this stuff! He's an amazing educator, and you can really pick up his books and learn a lot from them.
If you (or your office) can, hire him - because he is all that much better in person. I am a former student of his in JHU, and he was great. Really turned me on to Java and web development as a whole...
Almost everything has tutorials online these days. I find the theserverside.com and ibm's developer network have some good tutorials. I learned more from the Hibernate reference manual and tutorials than I did by a formal class that my work payed for. I'm always out on Spring's website browsing the reference manual. I don't recommend a book unless there is a good one that someone has recommended so it won't become a home for dust bunnies. If have a lot of cash to blow go for the books. Sun has a basic tutorial on Java. Sun also has a tutorial on J2EE/JEE. UML is design by modelling and is an instance I'd recommend a good book. You can do Java development with notepad and the command line if you want. However if you want syntax checking, automatic, javadoc information, and easy classpath management you're going to want to use an IDE. Eclipse and Netbeans seem to be the common free ones most people use (I'm pretty hard against Commercial Products/Vender Lock In's when there's a Free Open Source alternative). Eclipse has some nice features that can help you when it comes to tooling related to JEE. It's plugin (plug: OSGi) architecture allows tooling to be added for Spring, Hibernate, JavaServer Faces, Database, J2EE/EE Servers etc... There's a lot to be said to be able to debug and step through code in your IDE (Although some argue if you have proper unit testing and logging that you shouldn't need to). IDE also provide templates and formatting which helps easy development and maintainability. I find that I learn a language as I move in the industry and that they are all pretty common. I wouldn't bother to learn a language just to learn it and an employer will not value this kind of knowledge as much as on the job training anyway (although they do like people who are open to learning new things). If you know the basics to Algorithms, Object Oriented Design, Data Structures, Design Patterns, and UML then you can really apply this to any object oriented language (These are the books that get used). A nice thing about Java is the open source community and availability of free packages. In two words Apache and Sourceforge although there are others that are important too. I find that regardless of the language (or any task really) that the DRY (Don't repeat yourself) and KISS (keep it simple stupid) are good things to learn.
First off, make sure you really want to be a programmer.
If you absolutely hate reading - forget it. Some people try to "fake" being a programmer by just taking bits of something a programmer wrote, modifying it, and passing it off as a solution. As often as not - what they have created is a problem.
If you like to read, enjoy dealing with details, solving problems, seeing both the forest and the trees at the same time, are good at memorizing things that are written down, and are good with logic - you could make a really good programmer.
If it sounds like programming is something you want to try for yourself, you are in luck. These days, the tools, the tutorials, tons of sample programs, and lots of encouragement are abundant and free.
1. http://java.sun.com/ - download Java - specifically, J6SE (JDK 1.6) for your computer, unless you have a Mac in which case you already have J5SE or J6SE. Install it, and the accompanying documentation according to the directions on the download page. Then reboot.
2. http://www.eclipse.org/ - download Eclipse Ganymede bundle (Eclipse 3.4 with good selection of optional plugins preinstalled). Installation generally boils down to unzipping it and dragging the folder that produces to C:\ - or, if you are on Unix/Linux/MacOSX then to your home directory. Grab a local friend who knows Java to show you how to write a really short program that prints out "hello, world" in Java using Eclipse.
3. http://java.sun.com/tutorial - download the Java tutorial and start reading it. It is written in an informal, helpful style. If you have a friend at your side, they can explain things and answer questions as you read through it. That will help you a lot. You will be trying to form a picture of what goes on in programs, what Java is all about, why Java does certain things, etc. Your friend will help a lot. Guesses and searching all over the web for more clues will just slow you down. Read enough to get started. Mastery can come later.
4. Write some astonishingly simple and useless programs. Do not kill your aspirations off by trying to kill two birds with one stone. This is not the time to write a spreadsheet, a chess game, an accounting program, or a web browser. Just write simple little things with no GUI at first. Stuff like this:
a.) Print all integers from 1 to 10. This teaches you to write loops. You will have easiest time if you use a for-loop.
b.) Print list of all Fahrenheit degrees from 0 to 212 and next to each of those, print the equivalent temperature in Celsius. This teaches you to write simple mathematical expressions, and gives you practice writing another for-loop.
c.) Read some text from the keyboard or from the command line, and then print it out backwards; e.g. "Ten becomes one" is output as "eno semoceb neT". This gets you started at manipulating Strings.
d.) Write a program that defines a group of classes. Make sure you use some inheritance ("extends") and some polymorphism. The latter simply means that you define a method in a subclass that has same declaration as a method in its super class(es) but giving it a different implementation. These two things are key to writing powerful object oriented programs - which is one huge reason for Java's success.
e.) Read up on encapsulation. It enforces a little discipline on how classes can get at each other's data. Such rigor becomes very important in read software projects that involve large programs or more than one programmer.
f.) Now you have completed the basics. You have written some simple programs, so you know which way is up and the basic steps in writing any program. You have an integrated development environment (IDE) set up that makes it easy to enter, edit, debug, and run programs. So, now dream up some more short, easy programs to do. Try to choose a program you will have learn just one or two things in order to write it. Better to write 10 simple-as-heck short programs than one huge complicated one that you never fini
Let the PC get its zen on, for chrissake!