Slashdot Mirror


Java 5 RC Available, Gold Targeted for this Month

Trevor Leach writes "Sun's Java 5 download page is now serving up J2SE 5.0 RC. There are loads of productivity enhancements in this release, code named 'Tiger,' including generics, enums, autoboxing of primitive types, and metadata. Additionally, the Java Developer's Journal qoutes Sun's Graham Hamilton, chief technologist of Java Software, as specifying September 30 as Tiger's target release date."

12 of 65 comments (clear)

  1. autoboxing ? by BigBadDude · · Score: 4, Interesting



    why is autoboxing so darn important to some people??

    i will probably never use it because if i want a hash-table of integers or a binary-tree of doubles, i will write it myself with the native types. it is faster, and eats less memory.

    the whole idea of hiding complexity by converting int to Integer and vice versa automatically is kinda scareing.

    not to mention the waste of memory for creating those stupid wrapper objects...

    1. Re:autoboxing ? by rmull · · Score: 4, Interesting

      Ways to measure time:
      1) execution time
      2) development time

      1 is usually less important than 2. Really. If it saves me one round trip to the compiler, I'll take it. The merits of the boxes themselves aside, this is a very reasonable and useful thing to do, from the perspective of both ease of coding and of code clarity.

      --
      See you, space cowboy...
    2. Re:autoboxing ? by dkf · · Score: 2, Interesting

      The features add together. Taken as one, you can now just make a big extensible list of interesting integers and then do something with each of those list items, and you don't need to write lots of extra code to make it happen. You might not think this is a big deal, but it really helps in practice because it lets you write code that is closer to what you're thinking about instead of having to put in irritating book-keeping hoops all over the place. It's this sort of thing that makes languages like Perl, Python, REXX and Tcl so much more productive.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  2. Okay, nice, but... by Elamaton · · Score: 5, Interesting
    Well, if I'm going to learn Java properly, this might be as good a time as any. So far I've only scratched the surface with some trivial GUI apps a year and a half ago. Sure looks like I need to know it if I want to get a programming job around here (at least in Finland, it's Java, VB, C++ or C#, or another line of work - which sucks since I'm currently a PHP/Python man myself; and of the given alternatives, I'm only interested in Java).

    Getting a job would mean I'd have to learn J2EE as well (absolutely no one here is hiring plain J2SE people), and I honestly don't know how to go about it. Just looking at the TOC of Sun's J2EE tutorial is overwhelming with the enormous acronym soup, and judging by the articles I've read and by the quick glances I've taken at the types of literature available, learning it well seems to be nothing less than an impossible task.

    I remember seeing a graph depicting the ever-increasing requirements of a typical J2EE programmer compared to the actual skill levels of the current programmers. The gap is huge and ever widening, and I just know I'd be just one more lousy underperforming J2EE guy with my insufficient knowledge. Is it practically possible to learn the stuff in any other way besides doing it for a living, moving on up slowly from basic J2SE? Anyone here taken the leap, and how?

    I mean, you can't possibly know all that is J2EE properly. But what should one concentrate on, and roughly in what order? There's just TOO MUCH material, too many separate technologies, the practical purposes of which however overlap somewhat, and... I don't know, it's just too huge for my puny mind.

    And to go with the topic of the front page post even slightly: what does the new release of Java mean in the context of J2EE programming? What, if any, portions of the existing literature and other material does the new release make obsolete? And for J2SE literature, is there any fresh stuff that would be written with Java 5 in mind?

    Sigh... It's when things like this go through your mind that you wish you'd just be interested in something like plumbing as a career option, instead of programming. At least you'd always have work.

    1. Re:Okay, nice, but... by Scarblac · · Score: 4, Interesting

      I did one big J2EE project. We used Struts. There was one book that was very useful to me, and it's pretty short and affordable - _The Struts Framework: Practical Guide for Java Programmers_ by Sue Spielman. I can recommend it, it has a good overview and some details of all the little parts.

      I learned what a servlet is and how it works from the Sun tutorials, I think. Using Struts you won't make many pure servlets but it's important to have basic knowledge of what happens. Do the tutorial. Same for JSPs (they get compiled to servlets, you can make a JSP, run it, and look at the source of the servlet, if you really want to).

      We simply ran on Tomcat. Just install it and learn by online documentation. It of course has its pros and cons, but I can't really compare since I haven't used any other servers. It's a good start.

      Of course, always keep Sun's API reference pages close.

      As a layer between the OO Java parts and the database (MySQL in this case) we used a library called Torque. The idea is elegant and Torque is easy to learn, but it's slow and can become quite irritating. There are other options but I can't recall the names right now, and I think they are more complex.

      I never did find out what an EJB is.

      Oh, and these web apps can be hard to debug because of all the layers - setup Jython (a matter of putting the .jar somewhere and setting up the classpath correctly) so that you can call all your business code from a Python interactive prompt!

      --
      I believe posters are recognized by their sig. So I made one.
    2. Re:Okay, nice, but... by archeopterix · · Score: 4, Interesting
      Is it practically possible to learn the stuff in any other way besides doing it for a living, moving on up slowly from basic J2SE? Anyone here taken the leap, and how?
      I took the leap from a very basic Java knowledge (some hello worlds) to J2EE. Some hints:

      1. Motivation. Motivation helps. There's no motivation like being on an important project that uses J2EE, but this of course is usually beyond your control, unless you want to bluff your way into such a project (not recommended).

      2. Books. Avoid learning anything from pure specs. The books that helped me: "Java Enterprise in a Nutshell" from O'Reilly (Nutshell my ass, that's the thickest book in my room). "Enterprise JavaBeans" from O'Reilly, "Bitter EJB" (can't grab it now, so no details).

      3. Practice. I downloaded the Websphere Studio Application Developer (trial version) from IBM and started monkeying with it the moment I've heard about J2EE being used in the new project.

      4. Forget the APIs (at least their details). Try to make a mental map of the most important stuff - Container, Client, Beans and how they relate to each other. Once you got that, you can fill the details like APIs & such.
    3. Re:Okay, nice, but... by Scarblac · · Score: 2, Interesting

      That's fine. I realized after posting that our thing wasn't really "big" compared to the sort of thing J2EE can be used for, but Slash doesn't allow editing posts of course. It was big for us since the web app is used for order management, inventory control, etc everywhere in the company (a computer hardware web shop) and is also the site itself. It's about three man years of work, which is the biggest project I have experience with, but indeed not the sort of huge thing you would associate J2EE with.

      That said, for someone who can't see the forest for the trees and who needs a place to start, might as well look into that sort of thing and figure out what else to look at later.

      --
      I believe posters are recognized by their sig. So I made one.
    4. Re:Okay, nice, but... by Tomahawk · · Score: 3, Interesting

      what does the new release of Java mean in the context of J2EE programming?

      Sun have not yet released an updated version of the J2EE spec, and probably won't for a long time. As a result, Java 1.5 (or Java 5) will have no affect on J2EE for probably at least a year.

      The J2EE 1.4 spec was released last year, and not very many vendors had adopted it yet. I do J2EE programming here, and I still refer to the J2EE 1.3 docs for the API - I haven't found I've needed anything in 1.4 yet (even though our container are 1.4 complient).

      JVMs and J2EE containers are quite tricky little buggers, and generally don't work to well together with different version numbers. Most J2EE 1.3 containers won't work well with JVM 1.4 - I think it's because the J2EE stuff is very low level, and really needs the JVM to be the correct version (though I haven't tested a J2EE 1.4 container running on JVM1.3 - chances are some of the API required that is new in 1.4 won't be there, so it won't work that way either).

      So, SUN won't even begin to think about releasing a J2EE 1.5 until they have Java 1.5 in the bag, and probably not even until Java 1.5.1 has been released.

      T.

    5. Re:Okay, nice, but... by Anonymous Coward · · Score: 1, Interesting
      At work, I'm still using 1.3.2.

      Oh man, I hear ya. We're still on 1.3.x in my shop too (large US bank), and have no plans to upgrade to 1.4.x until at least a year after IBM releases Websphere 6.0.

      And the new Java 5? I think NASA will have a working space elevator before we see that in my shop. :-)

  3. Remember when C# came out... by km790816 · · Score: 2, Interesting

    And everyone said it was a shameless copy of Java.

    Enums, autoboxing of primitive types, and metadata...I suppose this is "inovation", right? There was no shameless copying of C# in any of these new features. It was all about customer demand.

    I'm not not putting down Java. I'm just saying one should think twice before judging the demands of a customer segment. I'd just like to see a feature list of things not in C# so I can see some original thinking on Sun's part.

  4. Where to start by Phouk · · Score: 3, Interesting

    mean, you can't possibly know all that is J2EE properly. But what should one concentrate on, and roughly in what order?

    First, "J2EE" can mean two things. Some people use as a somewhat sloppy catch-all-term for "server-side Java", but really just mean something like e.g. Java/JSP/Servlets/Struts/Hibernate/Tomcat. Some reserve "J2EE" for projects which, in addition, use EJBs and a full-blown J2EE server like JBoss, which Tomcat is not.

    Why is this relevant? Because, of course, the second variant includes even more stuff, but many many projects use the first variant, so I would start with that and ignore EJBs for the moment.

    But even the technologies in a project of the first kind are too many and too big to learn all at once, so I would pick one end to start from, either from the frontend (HTML etc. -> JSP, JSTL -> Custom Tags, Servlets -> e.g. Struts etc.) or from the backend (DB/SQL -> JDBC -> Hibernate||JDO||iBatis... -> etc.), and only later expand up (EJB) and out (know back to front and more frameworks).

    And, remember: Q: How do you eat an elephant? A: One bite at a time...

    --
    Stupidity is mis-underestimated.
  5. Re:There's one feature I can't WAIT to start using by bonniot · · Score: 3, Interesting
    Unfortunately, with Java 5 you will still need to write
    return list.toArray(new Foo[list.size()]);
    since list.toArray() still returns an Object[]. That's because of the restriction that forbids new T[...]. Of course, with a more advanced language, you could simply write
    return list.toArray();
    and let the compiler do the work for you.