Java 1.4 vs 1.5 Differences

Discussion in 'Java' started by Peter, Oct 18, 2006.

  1. Peter

    Peter Guest

    Greetings,

    I've begun work on updating a java 1.4 stand alone application to work
    with Java 1.5. It has some major problems with new version of Java.

    I've been trying to find a summary list of differences between the Java
    versions for someone familiar with Java 1.4.

    -ie. Enums is now a reserved word in Java 1.5 (or at least I think it
    is :)

    Would anyone know of a summary list of changes between Java 1.4 and
    1.5?

    Thanks,
    -peter
     
    Peter, Oct 18, 2006
    #1
    1. Advertising

  2. Jean-Francois Briere, Oct 18, 2006
    #2
    1. Advertising

  3. Peter wrote:
    > Would anyone know of a summary list of changes between Java 1.4 and
    > 1.5?


    Those I consider most important:
    * auto boxing/unboxing
    * generics
    * annotations
    * java.util.concurrent
    * enum
    * variable number of arguments
    * new for loop (it is not called foreach but is foreach)
    * import static
    * printf

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Oct 19, 2006
    #3
  4. Thomas Weidenfeller, Oct 19, 2006
    #4
  5. Peter

    Hulker69 Guest

    On 18 Oct 2006 12:47:40 -0700, "Peter" <> wrote:

    >Greetings,
    >
    >I've begun work on updating a java 1.4 stand alone application to work
    >with Java 1.5. It has some major problems with new version of Java.
    >
    >I've been trying to find a summary list of differences between the Java
    >versions for someone familiar with Java 1.4.
    >
    >-ie. Enums is now a reserved word in Java 1.5 (or at least I think it
    >is :)
    >
    >Would anyone know of a summary list of changes between Java 1.4 and
    >1.5?
    >
    >Thanks,
    >-peter


    I used the O'Reilly "Java 1.5 Tiger - A Developer's Notebook" book
    which covers most of the relevant stuff (at least to the point where
    it becomes useful).

    ISBN here in UK is 0-596-00738-8

    Look on www.oreilly.com as well.
     
    Hulker69, Oct 19, 2006
    #5
  6. "Peter" <> wrote in message
    news:...
    > Greetings,
    >
    > I've begun work on updating a java 1.4 stand alone application to work
    > with Java 1.5. It has some major problems with new version of Java.
    >
    > I've been trying to find a summary list of differences between the Java
    > versions for someone familiar with Java 1.4.
    >
    > -ie. Enums is now a reserved word in Java 1.5 (or at least I think it
    > is :)
    >
    > Would anyone know of a summary list of changes between Java 1.4 and
    > 1.5?


    Are you asking specifically for incompatibilities? If so, there's:

    * enum is now a keyword
    * generics will cause millions of ineradicable warnings in any code that
    uses collections
    * probably others I'm unaware of
     
    Mike Schilling, Oct 19, 2006
    #6
  7. Peter

    ddimitrov Guest

    ddimitrov, Oct 20, 2006
    #7
  8. Peter

    Peter Guest

    Right thanks!

    My hope was to find out how much I needed to look into this. Reading
    the Sun documentation is rarely umm fun :) Sounds like quite a bit is
    different, I'll probably take the new Java 1.5 Cert.

    Thanks again
    -peter

    Arne Vajhøj wrote:
    > Peter wrote:
    > > Would anyone know of a summary list of changes between Java 1.4 and
    > > 1.5?

    >
    > Those I consider most important:
    > * auto boxing/unboxing
    > * generics
    > * annotations
    > * java.util.concurrent
    > * enum
    > * variable number of arguments
    > * new for loop (it is not called foreach but is foreach)
    > * import static
    > * printf
    >
    > Arne
     
    Peter, Oct 20, 2006
    #8
  9. Peter wrote:
    > My hope was to find out how much I needed to look into this. Reading
    > the Sun documentation is rarely umm fun :) Sounds like quite a bit is
    > different, I'll probably take the new Java 1.5 Cert.


    Java 1.5 was a huge change to Java compared to 1.3 and 1.4 (and 1.6).

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Oct 21, 2006
    #9
  10. Peter

    Lew Guest

    Peter wrote:
    >> My hope was to find out how much I needed to look into this. Reading
    >> the Sun documentation is rarely umm fun :) Sounds like quite a bit is
    >> different, I'll probably take the new Java 1.5 Cert.


    "Fun" is relative. Personally I love reading Sun's documentation, but then
    some people like to eat fruitcake.

    If you do learn to enjoy Sun's docs, then you will accelerate your learning.
    They really do explain a lot.

    - Lew
     
    Lew, Oct 21, 2006
    #10
  11. Peter

    Peter Guest

    Thanks guys,

    I'll take your advice to heart and start reading through the Java 1.5
    docs. (its so painful :) I'm also taking this as an opportunity study
    and get my Java Programmer Certification. (seams like a good time)

    Thanks again,
    -peter
    PS: Most Java programmers I talk to have had the same question as me,
    so hopefuly this post will answer the basic question. (I hope it wasn't
    already asked, I looked for it :)


    Jean-Francois Briere wrote:
    > > -ie. Enums is now a reserved word in Java 1.5 (or at least I think it is :)

    >
    > enum (and not Enum) is now a reserved word :)
    > For the reserved words in Java have a look at this:
    > http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
    >
    > > Would anyone know of a summary list of changes between Java 1.4 and 1.5?

    >
    > There are many many many new features!!! Have a look at this:
    > http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html
    >
    > Regards
     
    Peter, Oct 25, 2006
    #11
  12. Peter wrote:
    > I've begun work on updating a java 1.4 stand alone application to work
    > with Java 1.5. It has some major problems with new version of Java.


    Ignoring the features and concentrating on the regressions:

    1. Thread priorities are broken when using synchronized objects.

    2. Under certain window managers under Linux/Unix you'll get a
    blank screen instead of your app. Use pack() before setting the
    size of the window to fix this.

    3. Some of the default fonts have changed - not really much of
    a regression but it will mean any screen shots, etc. are now out
    of date :(

    Richard
     
    Richard Wheeldon, Oct 25, 2006
    #12
  13. Richard Wheeldon wrote:
    ....
    > 2. Under certain window managers under Linux/Unix you'll get a
    > blank screen instead of your app. Use pack() before setting the
    > size of the window to fix this.


    pack() should not be regarded as a 'fix'. In fact, if you
    actually need to call setSize() at all, it is a strong hint
    that some components do not return a sensible
    preferredSize(), and should be fixed.

    Andrew T.
     
    Andrew Thompson, Oct 25, 2006
    #13
  14. Peter

    ThomasH Guest

    Richard Wheeldon wrote on 25-Oct-06 11:57:
    > Peter wrote:
    >> I've begun work on updating a java 1.4 stand alone application to work
    >> with Java 1.5. It has some major problems with new version of Java.

    >
    > Ignoring the features and concentrating on the regressions:
    >
    > 1. Thread priorities are broken when using synchronized objects.
    >
    > 2. Under certain window managers under Linux/Unix you'll get a
    > blank screen instead of your app. Use pack() before setting the
    > size of the window to fix this.
    >
    > 3. Some of the default fonts have changed - not really much of
    > a regression but it will mean any screen shots, etc. are now out
    > of date :(
    >
    > Richard


    ....as well as many AWT/Swing application are broken with JDK1.5!
    Just one small example: JWindow does not appear with proper
    background, sometimes it will not be repainted. (My custom made
    tooltip worked since JDK1.1 with Swing addition without a change.)

    This list is long, I have some whopping 85 topics on my list already,
    for AWT and Swing alone. I am sticking to jdk1.4 for now, I do
    standalone applications and I do not care about the deployment of
    the plugin. Good for me, but many of you will have to port and/or
    get the stuff fixed.



    This new Java is really a symptom of a sickness, pardon me if
    you disagree, but this is my take:

    Good language is a stable language. Java seems to be growing and
    growing toward titanic dimensions, leaving former behemoths like
    PL/1, ADA and C++ in shadows. And this causes that teams at Sun
    are no more capable of providing iron clad quality of this now so
    gigantic product. So far the quadratic growth, or rather explosion
    in size, was limited to the public classes. Now it took over the
    language itself, and this is bad news, regardless how much you
    might like or chose to ignore some of these novelties.

    The Pandora's box is open.

    Let me reach toward past, as James Gosling presented Java
    philosophy in regards of syntax and semantics. His vision was
    borne after learning from the case of C++, with its ambiguities,
    need for re-parsing, context sensitive cases etc. Maintenance
    was a nightmare. Gosling said, (I paraphrase of course) that if
    a compiler cannot resolve a language construct, than how a human
    can? Java was designed to be better, to stick with LALR(1) type
    of grammar and thus to be easy to parse and be easy to read by
    humans.

    Now the group of experts introduces these unholy generics "boxes"
    resembling C++ templates. The problem with this syntax is that
    is uses tokens which have the right to not paired. We can always
    relay on () or [] or {} pairs, but not on <>, these are components
    of expressions. Needless to say, many editors will not be able to
    support such syntax, vi for example, I use the "%" key to jump
    to paired element all the time. I am not sure at this time if
    any visual illusions 'a la C++' can be now created with this
    boxing/generics scheme of theirs.


    I am asking myself, why this lack of fantasy and imagination
    strikes people so often, why this copy-ism of someone else's
    solution takes over so often? We have so many completely
    different languages, Eiffel, Haskil, Smalltalk... Why not
    to go shopping for a while for something more Java'ish and new?


    Some of you might recall the PL/1 case: IBM forced a development
    of a lingua franca for the future and failed. Designers of
    PL/1 were so enticed by Fortran, that they made the language
    look like Fortran on steroids. Many syntactic elements were
    almost identical, but with devious semantic differences in
    some cases... (!) Over the time this has proven a deadly
    ingredient to cause some serious havoc. We have had many well
    documented cases of severe failures in financial, technical
    and military applications alike. Remember the FORMAT case,
    which rounded floating point values just a bit different in
    some cases on these pesky bills, and the resulting law suits
    and fraud charges...

    Java goes now officially the same way, "Congratulations"
    to the expert group, I mean it sarcastic. Please, please
    stop adding things to Java at last. You done, done for good.
    Freeze it.

    Thomas
     
    ThomasH, Oct 27, 2006
    #14
  15. ThomasH wrote:
    > This list is long, I have some whopping 85 topics on my list already,
    > for AWT and Swing alone.


    Any chance of posting these - before I run into them?

    Richard
     
    Richard Wheeldon, Oct 27, 2006
    #15
  16. Peter

    ThomasH Guest

    Richard Wheeldon wrote on 27-Oct-06 15:27:
    > ThomasH wrote:
    >> This list is long, I have some whopping 85 topics on my list already,
    >> for AWT and Swing alone.

    >
    > Any chance of posting these - before I run into them?
    >
    > Richard


    I will try, however I am swamped currently and as I
    said I am in the luxury to ask people to run our
    product with jdk1.4.

    I usually work on posting them to java bug parade.
    Its a proper place to get a chance to get them
    fixed, however not really for sure. See how dated
    some of these bugs are. They are flooded by new
    functionality and so the "old stuff" seem so
    irrelevant...

    Thomas
     
    ThomasH, Nov 2, 2006
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cyberdude

    Differences between C++ and Java

    cyberdude, Sep 13, 2003, in forum: Java
    Replies:
    36
    Views:
    6,531
    Will Hartung
    Sep 17, 2003
  2. Steffen Huebner

    HP/UX Java 1.3.1.02 date/time differences

    Steffen Huebner, Apr 30, 2004, in forum: Java
    Replies:
    2
    Views:
    685
  3. Paul Morrison
    Replies:
    1
    Views:
    1,769
    Joseph Dionne
    May 1, 2005
  4. Home_Job_opportunity
    Replies:
    0
    Views:
    524
    Home_Job_opportunity
    Jan 8, 2009
  5. Home_Job_opportunity
    Replies:
    0
    Views:
    611
    Home_Job_opportunity
    Jan 14, 2009
Loading...

Share This Page