Results 1 to 7 of 7

Thread: new sdk..{resolved}

  1. #1

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Resolved new sdk..{resolved}

    If I was to get an updated sdk, would I still be able to compile and use older programs? For instance, in the sdk I use right now, for I/O you would use BufferedReader. In the newer sdk they have a Scanner object or something. So would it compile the older programs?
    Last edited by System_Error; Oct 24th, 2004 at 07:34 PM.

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Is the Scanner object a replacement or just an added class? You must be using jdk1.5 correct?

  3. #3
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    If you are running say sdk1.5.0 you would be able to compile and run older programs but you would not be able to do the same using an older sdk build if any of your code uses new features found in subsequent versions of the sdk.

  4. #4

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111
    Right now I use sdk 1.3..I think. Not too long ago I tried to compile source code made by someone else in sdk 1.5 and I wasn't able to because it had the Scanner object in place of bufferedReader.. Im not sure if it is taking place or if it is just an added class. I just was thinking about upgrading to sdk1.5 and wanted to make sure I coud compile stuff I wrote in 1.3..

  5. #5
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    According the the java docs a java.util.Scanner is a new class and not a replacement for java.io.BufferedReader. Two totally different classes in two different packages. Yeah backwards compatibility for previous sdk builds should be there unless a class was dropped in the new jdk version.

  6. #6

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111
    O.K. Well thank you a bunch for your help.

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    JDK 1.5 is not fully backwards compatible, even though that was the idea. For example, the org.w3c.dom package in 1.5 contains DOM3 interfaces, older JDKs have DOM2 interfaces. The result is that you can't compile any classes that implement the old interfaces, because they suddenly don't implement the full interface anymore, making them abstract without being marked as such.

    Apache Cocoon is one application that fails to compile on 1.5.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width