Forgot your password?
typodupeerror
Java Programming

Java, Where To Start? 558

Posted by ScuttleMonkey
from the that's-pure-concentrated-evil-coming-out-the-back-of-you dept.
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?
This discussion has been archived. No new comments can be posted.

Java, Where to Start?

Comments Filter:
  • Wrox Press (Score:5, Informative)

    by dnoyeb (547705) on Monday September 01, 2008 @11:29AM (#24830957) Homepage Journal

    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.

    • Re: (Score:3, Interesting)

      Does Java uses finalizers? If so, how do they differ from C++ destructors?

      (Honest question - I'm not a Java guy but IIRC I found the finalizer concept in Java useful in understanding finalization (called during GC) in Spidermonkey.)

      • Re:Wrox Press (Score:5, Informative)

        by jfim (1167051) on Monday September 01, 2008 @12:19PM (#24831601)

        Does Java uses finalizers? If so, how do they differ from C++ destructors?

        Yes, it does. They differ from C++ destructors as they are not called explicitly(or implicitly when variables get out of scope, as in C++). Rather, finalizers are called when an object is garbage collected.

        The usual advice is not to use finalizers, except to make sure that underlying native resources are released(ie. file handles, sockets, etc.). Even then, there should be a mechanism to release those resources without relying on the finalizer being called, such as a close() method or an equivalent. The finalizer is only guaranteed to be called when the object is GC'ed, which may happen much later than expected if there is not a lot of pressure on the memory system or if there is still a reference to the object.

        There is no guarantees that finalizers will ever be called for an object, as the VM can be forcibly interrupted via Runtime.halt() and finalization of all objects on VM shutdown can be disabled.

      • Re:Wrox Press (Score:4, Informative)

        by TheRaven64 (641858) on Monday September 01, 2008 @12:36PM (#24831839) Journal
        A lot of OO languages split the allocation and initialisation calls into two separate methods. Objective-C uses alloc and init. C++ uses operator new and the constructor. One is responsible for allocating memory for the object, the other is responsible for initialising its state. Destructors and finalisers are the equivalent pairing in the opposite direction. A finaliser is responsible for the inverse operation to init while a destructor is responsible for the inverse operation to alloc. In many languages these are both implemented in the same method.

        In a garbage-collected environment you typically don't provide the allocator or destructor. Similarly, you don't need your finaliser to handle destruction of instance variables, since the garbage collector will do this for you. The only thing you need a finaliser to do is release any resources that are not managed by the garbage collector. This includes locks, I/O handles, and so on. In Java these are typically wrapped in an object of some kind, so you don't need to explicitly release them either, since the object encapsulating them does this. You would use a finaliser in a class which used the native code interface to acquire resources from the operating system or some other source outside the JVM. Without doing this, you would leak.

    • Re: (Score:3, Interesting)

      I would avoid Wrox on general principles. This was hammered home to me when I was offered a contract to write a single chapter for a Wrox book. Apparently they go out and find people who will work *extremely* cheap. I mean, the pay was in the three digits -- I turned them down, needless to say. And as near as I could tell, they didn't do much vetting of my expertise. They just take all these chapters and throw them together into a book. You're just not going to get a cohesive publication that way.

      They put a

      • Re: (Score:3, Insightful)

        by nwf (25607)

        I've had the misfortune of purchasing a few Worx titles, and they are indeed incoherent, gigantic and largely useless. I've generally had good experiences with O'Reilly books, however.

        But the most useful has really just been google. Finding interesting examples and work through stuff, as most books on modern Web technology tends to be rather out of date by the time it hits the bookstore.

  • Just a thought.... (Score:4, Insightful)

    by jtcedinburgh (626412) on Monday September 01, 2008 @11:30AM (#24830971)

    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.

    • by skrolle2 (844387)

      For programming, that reasoning is bullshit. The more code you see and write, the more programming paradigms and syntaxes you have seen and used, the better programmer you will be.

    • by cronot (530669) on Monday September 01, 2008 @12:01PM (#24831369)

      The problem as I see it (I'm in the same situation as the poster - I have experience in almost all languages / DBs / etc. he has, except Java) is that he has experience in areas that are saturated and / or in a decline trend, and none in an area with a growing demand.

      So I think it's not really a matter of being a "jack of all trades", as you put it, but keeping up with the market demands. I actually wouldn't like to learn Java right now, as I think I can do pretty well with my current experience. I'm more interested in learning other newer languages / technologies that seem more interesting and more promising than Java (even if sometimes not as mature or proven), like Ruby, Python, etc... Unfortunately, none of these has nearly as much demand as does Java, so I'm more compelled to learn it to keep myself hireable.

      Btw, it's not that I think Java is a worse language than the ones I'm more interested in, it's just that I think that learning Java wouldn't be as fun or rewarding than the alternatives. But I'm more than willing to be convinced that I'm wrong, so I'll watch this discussion closely for tips.

  • Thinking in Java (Score:5, Informative)

    by yanyan (302849) on Monday September 01, 2008 @11:31AM (#24830983)

    Thinking in Java is nice. And it's free. http://www.mindview.net/Books/TIJ/ [mindview.net]

    • Re: (Score:3, Interesting)

      by Pengo (28814)

      Yup, I agree 100%.

      I started reading this book from the internet in 1999 when I started my career in programing Java. It was a great place to start, there might be better material out now but that's what gave me my jump start.

  • Thinking in Java (Score:5, Informative)

    by lurker-11 (977638) on Monday September 01, 2008 @11:32AM (#24831021)

    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/ [mindview.net]

    • Re: (Score:3, Insightful)

      by dubl-u (51156) *

      I second that recommendation.

      However, I'd suggest you go pretty light on actually reading the books. Just get in there and build something.

      Sure, you can use the books as references. I'd get O'Reilly's "Java in a Nutshell" reference, and also one or two of their Java cookbooks, so you can look at some reasonably clean example code.

      But you should mainly pick a number of small projects and build them. Java is a mature platform with a lot of history and extensions for all sorts of circumstances. That can be int

  • ... 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.)

    • Re: (Score:3, Insightful)

      by d_strand (674412)
      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.
  • by Anonymous Coward

    public static void main () {

  • Try javabat.com (Score:5, Informative)

    by icknay (96963) on Monday September 01, 2008 @11:36AM (#24831051)

    For basic coding practice, try the free http://javabat.com/ [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

  • I would start by looking at a few open source Java projects, learn how to compile them, and make changes to them.

    For example, a few weeks ago I submitted a OS X copy/paste key binding patch to JEDIT [sourceforge.net]. I am by no means a Java developer, but since I use that product every day to do web apps, I got frustrated enough that I went ahead and fixed a problem myself.

    Stuff like Azerus/Vuze [sourceforge.net], Cyberduck [sourceforge.net], and Open Office are used on my computer regularly. All of which are are Java based. Downloading the sourcecode to prod

  • by leuk_he (194174) on Monday September 01, 2008 @11:41AM (#24831121) Homepage Journal

    Sun has developed a program to train for java.

    read at the sun site [sun.com]

    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.

  • Head first (Score:4, Informative)

    by oliderid (710055) on Monday September 01, 2008 @11:41AM (#24831123) Journal

    My first Java book was: head first. http://oreilly.com/catalog/9780596004651/ [oreilly.com]

    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.

  • Job or knowledge? (Score:2, Insightful)

    by Anonymous Coward

    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.

    • by Bazman (4849) on Monday September 01, 2008 @11:59AM (#24831349) Journal
    • Re: (Score:3, Insightful)

      by mpcooke3 (306161)

      Only problem with this strategy is that the only companies that will employ you are full of numptys that don't know what they are doing.

      These places are usually god damn awful places to work.

    • Re: (Score:3, Interesting)

      by dubl-u (51156) *

      I have met lots of J2EE experts at work, who would not be able to code a "Hello World" program,

      Just for those who think he's kidding:

      Having people do "Hello World" on the whiteboard is one of my standard interview questions. I'm pretty good at weeding out the enterprise 'tards by resume alone, but I'm still surprised how many people are unable to write a working "Hello World" program from scratch. Maybe a third of my first-round interviewees fail this.

      • by MillionthMonkey (240664) on Monday September 01, 2008 @02:06PM (#24833001)

        Hello World? That's easy!
        public interface MessageStrategy {
              public void sendMessage();
        }

        public abstract class AbstractStrategyFactory {
              public abstract MessageStrategy createStrategy(MessageBody mb);
        }

        public class MessageBody {
              Object payload;
              public Object getPayload() {
                    return payload;
              }
              public void setPayload(Object payload) {
                    this.payload = payload;
              }
              public void send(MessageStrategy ms) {
                    ms.sendMessage();
              }
        }

        public class DefaultFactory extends AbstractStrategyFactory {

              private DefaultFactory() {}

              static DefaultFactory instance;

              public static synchronized AbstractStrategyFactory getInstance() {
                    if (null==instance) instance = new DefaultFactory();
                    return instance;
              }

              public MessageStrategy createStrategy(final MessageBody mb) {
                    return new MessageStrategy() {
                          MessageBody body = mb;
                          public void sendMessage() {
                                Object obj = body.getPayload();
                                System.out.println((String)obj);
                          }
                    };
              }
        }

        public class HelloWorld {
              public static void main(String[] args) {
                    MessageBody mb = new MessageBody();
                    mb.setPayload("Hello World!");
                    AbstractStrategyFactory asf = DefaultFactory.getInstance();
                    MessageStrategy strategy = asf.createStrategy(mb);
                    mb.send(strategy);
              }
        }

  • Don't use Java (Score:4, Informative)

    by Anonymous Coward on Monday September 01, 2008 @11:42AM (#24831131)
    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.
  • Start simple. (Score:5, Insightful)

    by Anonymous Coward on Monday September 01, 2008 @11:45AM (#24831161)

    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.

    • Re: (Score:3, Interesting)

      by fbjon (692006)
      I agree. The standard library is the most important library of them all. Many people seem to fancy rolling their own when they need something, without realising that it's already in the standard library. For instance, a couple of years went by before I realised that there's a Logger class to handle all logging needs.

      As far as I know and can see, there are no must-have frameworks or libraries, only sometimes-good-to-use frameworks and libraries.

      Speaking of exceptions, do not catch Exception, and do not catch

      • Re:Start simple. (Score:4, Informative)

        by _xeno_ (155264) on Monday September 01, 2008 @12:48PM (#24831999) Homepage Journal

        Many people seem to fancy rolling their own when they need something, without realising that it's already in the standard library. For instance, a couple of years went by before I realised that there's a Logger class to handle all logging needs.

        Logging's a bad example. There were a ton of logging libraries around because Sun didn't bother adding logging until Java 1.4, and even then, their logging implementation is subpar compared to some other packages out there.

        Speaking of exceptions, do not catch Exception, and do not catch Throwable, unless you know exactly why you should do that.

        Oh God yes. I've forgotten the number of times I've seen the anti-pattern:

        public Object getFoo(int id) {
            try {
                return database.lookup("foo", id);
            } catch (Exception e) {
                return null;
            }
        }

        The great thing about that is that it means that there's no way to tell the difference between "an error occurred" and "the object doesn't exist."

        I'd like to say this is less common now, but the last time I ran into it was last Friday, i.e., the last time I was at work. I spent a good chunk of time making methods throw exceptions.

        This isn't to say that catching exceptions and ignoring them is never safe, sometimes it is. But unless you can come up with a good justification (and then leave a comment explaining it!), don't do it. It'll just piss off other developers when the applications randomly stops working for no readily apparent reason.

  • by petes_PoV (912422) on Monday September 01, 2008 @11:46AM (#24831169)
    Learning the mechanics of the Java language are the easy bit - when it boils down to the basics of the syntax, there's not much to it (since you already have many other, similar languages).

    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.

  • by MythMoth (73648) on Monday September 01, 2008 @11:46AM (#24831173) Homepage

    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 [sun.com] 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.

  • by hattig (47930) on Monday September 01, 2008 @11:47AM (#24831181) Journal

    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

  • 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.

  • by dolmen.fr (583400) on Monday September 01, 2008 @11:50AM (#24831223) Homepage

    Once you get the basic Java syntax (which will not take long looking at the langages you already know), read this book: Effective Java [sun.com] , by Joshua Bloch.
    There is also a video on YouTube: Effective Java Programming with Joshua Bloch [youtube.com].
    And you can read it on Google Books [google.fr].

  • Groovy (Score:5, Interesting)

    by mgkimsal2 (200677) on Monday September 01, 2008 @11:51AM (#24831235) Homepage

    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!

  • by Kupfernigk (1190345) on Monday September 01, 2008 @11:56AM (#24831301)
    I'm going to risk being upsetting here and say that, if you have any real experience with SQL, avoid things like Hibernate. They try and force you to do things the way the Hibernate developers think, and this is not good because they just regard the database as a persistence layer, adding a lot of complexity for the sake of things you may never want to use. Leverage your existing skills by trying to do things "directly" in Java, talking to the APIs as simply as possible. Because then you will be able to do things that the grunts cannot do, since you will get the full benefit of both technologies.

    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.

    • Re: (Score:3, Insightful)

      by MythMoth (73648)

      They try and force you to do things the way the Hibernate developers think

      This is somewhat true.

      and this is not good because they just regard the database as a persistence layer

      This not so much.

      I can't speak for other persistence layers, but Hibernate specifically is a good choice if you are designing a schema from scratch. It can be applied to pre-existing schemas (legacy stuff) but the less well designed that schema is, the more painful Hibernate will be to use.

      If you disagree, perhaps you could cite some specific things that you think are wrong with Hibernate's default approach, or where you believe it fails to support some legitimate structure in the data

  • by ilovegeorgebush (923173) * on Monday September 01, 2008 @11:56AM (#24831311) Homepage
    I've helped out with interviews where I work, and here's some of what we look for:
    • Experience - not just in Java, but also in the industry.
    • Core Java, Essential J2EE and Web Frameworks - understanding of core Java, its querks (reference checks: .equals() verses == for instance). J2EE is just a specification. Get used to that. Learn the basics of J2EE and how servlets, JSPs and the request/response process works (FTLOF, know the difference between GET and POST!). Struts experience is a good thing.

    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.

  • by mccalli (323026) on Monday September 01, 2008 @12:02PM (#24831393) Homepage
    Not recommending a book, just specifics of Java:
    • Threading
      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.
    • JDBC
      Persistance frameworks are all well and good, but understand the fundamentals of how things work at the database level inside Java.
    • Spring
      Although this changed a little with the latest rev of EJB, many sites simply dumped it and went with Spring. Worth knowing.
    • Application servers
      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

  • Two words (Score:3, Informative)

    by pak9rabid (1011935) on Monday September 01, 2008 @12:14PM (#24831531)
    Richard Baldwin. He's fairly well-known online. He was a professor of mine that introduced me to Java. Check out his tutorials [dickbaldwin.com] 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.
  • by LizardKing (5245) on Monday September 01, 2008 @12:40PM (#24831885)

    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/ [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

  • by ewg (158266) on Monday September 01, 2008 @12:52PM (#24832067)

    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.

  • there! (Score:3, Funny)

    by ogrisel (1168023) on Monday September 01, 2008 @01:24PM (#24832413)
    http://python.org/ [python.org]
  • by angel'o'sphere (80593) on Monday September 01, 2008 @01:25PM (#24832439) Homepage Journal

    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:
    just start coding. Besides an IDE you don't need anything for starting to work with Java (probably knowing how to browse Java Doc ;D and a very short introduction into the syntax of Java)

    The more complex answer:
    If you add Java to your language zoo ... 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.

    UML
    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 ... 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)

    Databases, Hibernate, MySQL
    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. ... 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.

    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
    Just learn enough Java to be able to compile simple programs (well, 2 days or something ;D).
    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

  • by tjuricek (514513) <tristan,juricek&alumni,ucsd,edu> on Monday September 01, 2008 @02:28PM (#24833225) Homepage

    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/ [google.com]

    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/ [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/ [apache.org] and Jakarta http://jakarta.apache.org/ [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/ [apache.org]

    Hadoop is an open-source implementation of Google's MapReduce idea.

      2. Scala http://scala-lang.org/ [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/ [apache.org] + Databinder http://databinder.net/ [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/ [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.

  • by IHC Navistar (967161) on Monday September 01, 2008 @04:54PM (#24834607)

    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".

  • Sun Java Tutorial (Score:3, Informative)

    by syousef (465911) on Tuesday September 02, 2008 @12:13AM (#24838259) Journal

    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/ [sun.com]

    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 [sun.com]

    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.

Anyone can do any amount of work provided it isn't the work he is supposed to be doing at the moment. -- Robert Benchley

Working...