• Post Reply Bookmark Topic Watch Topic
  • New Topic

NIO and backward compatability with SDK 1.3  RSS feed

 
Jim Rock
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron does your book address this?
 
Ron Hitchens
Author
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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 ]
 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • 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
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!