Prev: Fun with casts
Next: JNDI searches
From: Arne Vajhøj on 13 Apr 2010 20:13 On 12-04-2010 12:40, Mike Schilling wrote: > Roedy Green wrote: >> On Sat, 10 Apr 2010 22:21:07 -0700, "Mike Schilling" >> <mscottschilling(a)hotmail.com> wrote, quoted or indirectly quoted >> someone who said : >> >>> The OS-specific parts of the JRE [1] are, of course, precisely stuff >>> that's been tweaked to work on all supported platforms. >> >> File i/o, networking etc are basically the same on all platforms. > > Only if "all platforms" means Lunux, Unix and Windows, period. I am not sure that I understand the period part. Some of the API's are defined in the C standard. They will be everywhere. Other API's are defined in POSIX. OS'es like OpenVMS and Z/OS are POSIX compliant. According to Wikipedia QNX and VxWorks are also POSIX compliant. And Symbian has a compatibility package. Arne
From: Arne Vajhøj on 13 Apr 2010 20:15 On 12-04-2010 08:44, Eric Sosman wrote: > On 4/12/2010 4:54 AM, Roedy Green wrote: >> On Sat, 10 Apr 2010 22:21:07 -0700, "Mike Schilling" >> <mscottschilling(a)hotmail.com> wrote, quoted or indirectly quoted >> someone who said : >> >>> The OS-specific parts of the JRE [1] are, of course, precisely stuff >>> that's >>> been tweaked to work on all supported platforms. >> >> File i/o, networking etc are basically the same on all platforms. > > Roedy, you should get out more. ;-) The C and POSIX standards define a lot. And most platforms are either compliant or close. >> This >> permits the same Java API to access the native code to handle the >> minor variations. > > The Java API's can access a sort of "least common denominator" > of capabilities found on most systems (on all Java-hosting systems, > although that's a tautology). But where do I find the Java classes > that support DECnet, or ISAM files, or AF_UNIX sockets, or resource > forks, or security designators (not sure if that's the right term), > or doors, or ...? > > Portability always involves some sacrifice of capability. It's > a matter of balance, not of universality. Very true. Arne
From: Arne Vajhøj on 13 Apr 2010 20:18 On 12-04-2010 04:54, Roedy Green wrote: > On Sat, 10 Apr 2010 22:21:07 -0700, "Mike Schilling" > <mscottschilling(a)hotmail.com> wrote, quoted or indirectly quoted > someone who said : >> The OS-specific parts of the JRE [1] are, of course, precisely stuff that's >> been tweaked to work on all supported platforms. > > File i/o, networking etc are basically the same on all platforms. This > permits the same Java API to access the native code to handle the > minor variations. > > Things like the registry are highly specific. Only Windows has one. > So you can't very well write platform-independent code, though the > preferences system is a rough stab at it. Sun won't help you. You must > look to third parties or JNI. Various other OS's has gotten registry compatibility libraries. But fundamentally it is a non portable feature. Arne
From: Mike Schilling on 13 Apr 2010 21:44 Arne Vajh�j wrote: > On 12-04-2010 08:44, Eric Sosman wrote: >> On 4/12/2010 4:54 AM, Roedy Green wrote: >>> On Sat, 10 Apr 2010 22:21:07 -0700, "Mike Schilling" >>> <mscottschilling(a)hotmail.com> wrote, quoted or indirectly quoted >>> someone who said : >>> >>>> The OS-specific parts of the JRE [1] are, of course, precisely >>>> stuff that's >>>> been tweaked to work on all supported platforms. >>> >>> File i/o, networking etc are basically the same on all platforms. >> >> Roedy, you should get out more. ;-) > > The C and POSIX standards define a lot. And most platforms are > either compliant or close. Perhaps this has changed since I worried about this stuff, but at one time "POSIX compliant" meant "A simple-minded test suite could be made to compile and run", not that you'd actually use the POSIX interfaces for anything that mattered.
From: Lew on 13 Apr 2010 22:18
Roedy Green wrote, quoted or indirectly quoted someone who said : >>> File i/o, networking etc are basically the same on all platforms. Mike Schilling wrote: >> Only if "all platforms" means Lunux, Unix and Windows, period. Arne Vajhøj wrote: > I am not sure that I understand the period part. > > Some of the API's are defined in the C standard. They will be > everywhere. > > Other API's are defined in POSIX. OS'es like OpenVMS and Z/OS > are POSIX compliant. > > According to Wikipedia QNX and VxWorks are also POSIX compliant. And > Symbian has a compatibility package. Since you mention QNX, an older version of which I used for many years some time back, let me say that it is a really pleasant OS to use, and blazingly fast. Programming for it was, and by all accounts still is pretty much like programmin for any *NIX platform, but with some extra goodies that make it a joy to work with. QNX uses message-passing over a real-time microkernel Javaat the core of its activities, and was the earliest and most effective OS of my experiencing at leveraging some of the advanced multitasking features that have been built into Intel CPUs since the '286. As for the portability question, at the top QNX looks like Linux or other *Nices. While its file system is more advanced than most, or was back then (I once completely recovered a file system that had lost all its directory nodes), it still uses the same kinds of C calls, inodes and so forth that most programmers know. I see that there is a robust hard real-time Java (pre-5) implementation for QNX. <http://www.aicas.com/qnx> Just adding my personal experience to endorse what Arne said. Even if "Lunux, Unix and Windows" were all that Java supported, or supported well, that's still the great majority of OS installations. (One can basically count Mac in that group.) -- Lew |