• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NIO and backward compatability with SDK 1.3

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ron does your book address this?
 
Author
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. Because there is no backward compatability. NIO is an integral part of the base 1.4 Java platform. It cannot be used independently because much of it is implemented in the low-level plumbing of the JVM itself.
If you make the decision to use NIO, you're committed to 1.4 - there's no going back. I think this is one reason many people are hesitant to use it extensively yet. I personally got burned on this. A client committed to using 1.4 and I used a few NIO features in the code. They then decided that they still needed to support 1.3 and that stuff had to be backed out.
[ April 16, 2003: Message edited by: Ron Hitchens ]
 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hate to suggest this (less you shoot yourself in the foot) but you could certainly simulate some of the new features in NIO using JNI.
For example, MMFs are simulated in a JNI/C++ solution described by this article
 
Ron Hitchens
Author
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure, you can always write some JNI glue to get down to the bare metal, but that's not NIO. Prior to 1.4, this was the only way to get to such functionality. Unfortunately, JNI code is by definition OS-specific and non-portable.
NIO is the standard set of APIs to do this sort of thing. A common set of classes and interfaces for which the system-specific glue code has been packaged into the system-specific JVM.
I understood the original question to be whether NIO could be used with 1.3. The answer to that question is no, because NIO depends on 1.4.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic