This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

SDK 1.3 vs 1.4  RSS feed

 
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ivor Horton !
Which kind of projects will
i general benefit most of SDK 1.4 ?
Is this book for beginners or people
with some java-experience ?
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry,
I m not Ivor.
but i can Ans u b/c i read this book.
It is a very nice book & also good for new one's
in programing.
when i read it second time i understand it very well.
but i think its Example r little bit difficult.
But over all the book is very good & also help u in SCJP2.
Thanks.
 
Author
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a lot of incremental improvements in SDK 1.4 over 1.3 but the most significant are:
-XML document processing using DOM And SAX, so you can read, write and modify XML files. This is by far the most significant new feature in my view.
-New I/O, which is much more efficient than the old I/O especially for files. This is a very different mechanism for I/O that makes it possible to use the operating system I/O capability without intermediate buffering.
-support for regular expressions. These will be familiar to users of Perl and they provide a very powerful text processing tool, but probably won't be of interest to everyone.
-The printing support has been greatly enhanced, but the new bits here are primarily for enterprise systems where multiple printers are available.
My book is intended for the complete beginner in Java. Ideally you should have some limited previous programming knowledge, VB say, but some folks who are completely new to programming have managed to learn Java using earlier editions of the book. Overall I tried not to assume any specific prior programming knowledge, just that you have a rough idea of how computer programs execute.
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ivor,
How much does this books differ from the 1.3 version ? Is it a complete rewrite or just an adaptation of the previous book ?
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ivor,
I have to thank you for the excellent "Beginning Java 2 SDK 1.2 Edition", a previous iteration in the series. I've found it to be one of the best book around to learn Java with. Everyone I have recommended the book to has had similarly good experiences.
Thanks!
Regards,
Reuben Cleetus.
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any migration path defined to change old (1.2 and 1.3) to 1.4?
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ivor,
Have you ever do some performance benchmark comparison between JDK1.4 new IO API and JDK 1.3 io API. I have done some funny test a few weeks ago. It seems nio Api is much slower than jdk 1.3 io API. Do you have any idea about this? I was using ByteBuffer and FileChanel in nio package to copy different size and type of files. in JDK 1.3 I used FileInputStream.
Regards
 
Ivor Horton
Author
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Re 1.4 edition of my book - this is an update of the previous edition so if you have that I suggest you don't buy the new one!
There are now five chapters on I/O and it covers the new I/O for files rather than the old. There are two new chapters on XML and an intro to regular expressions. Because of space limitations some stuff from the 1.3 edition has had to be removed to make room for the new chapters (Sound, animation and DB stuff are not in the 1.4 edition.)
 
Ivor Horton
Author
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code written for 1.2 or 1.3 should run unchanged with SDK 1.4. In fact the compiler for 1.4 compiles code as 1.3 by default. You have to specify the command line option -source 1.4 to compile as 1.4. This is to overcome possible incompatibilities with assertions that were introduced in 1.4.
 
Ivor Horton
Author
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get a performance gain with 1.4 new I/O you need to create direct buffers (using ByteBuffer.allocateDirect() rather than ByteBuffer.allocate() ). With a direct buffer you should get I/O performed directly with the ByteBuffer that you allocate (tho' it's not guaranteed). Without this data will be copied between the sytem I/O buffers and your buffers.
I haven't done any specific measurements myself, but I'm surprised that you found 1.4 slower. I think that performance improvements are only likely to show with fairly substantial I/O operations.
Reading/writing a few hundred bytes are unlikely to show an appreciable improvement. I/O with small amounts of data can be very misleading. Access time and rotational delays on the hard disk can be a dominant factor, and the timings will depend on where the space is on your disk. Defragging the drive can have a big effect on the results.
 
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main issues I have with 1.4 is that some of my guis do not act as they did under 1.3. Is this because some of my methods are deprecated? I have not been programming long and this is my first version switch.
Thanks,
 
Ivor Horton
Author
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jason,
Deprecated methods should not alter the behavior of your code. Undesirable or obsoleted methods are deprecated rather than being deleted in order to allow existing code to be upwards compatible.
1.4 is supposed to be strongly compatible with 1.2 and 1.3. Incompatibilities are noted at http://java.sun.com/j2se/1.4/compatibility.html .
I have found that problems can typically arise moving from one release to another for three reasons:
-bugs in my code that become apparent because of class lib changes.
-bugs in the new release that were not in the old release.
-less than ideal coding that builds in unnecessary dependencies on things in the class lib such as the actual values of constants.
-changes to the class lib that have ramifications not identified by the folks at Sun.
Having said that, I have had relatively few problems moving code from one release to another...
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I sure could use this book !!
thanks for steping by.
Yoel
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!