This week's book giveaway is in the Reactive Progamming forum. We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line! See this thread for details.
Right, here I go, I don't knoiw if this is the right place for this, but here goes anyway! Coming near to the end of my first major java application, I have had cause to doubt Sun's claim of platform independency. My application was due to run on PC's and Apple Mac's. But there were certain criteria in my program which meant interacting with the native o/s. These functions such as keeping a window modal, are pretty much neccessary features of any standalone application. And although it is possible, it is by no means simple. Also the Apple macs I was designing the program for, run Classic o/s and not mac o/s X, therefore they don't support Java 1.2, and swing, JDBC 2.0. Where's the platform independence in that? Anyway thats my gripe off my chest, if anyone has had similar problems or wants to jump to the defence of Java, please do, as my enthusiam for Java is waning.
Next thing you know people will be complaining that their Java 1.4 programs don't work on Palm Pilots, or that swing applets don't work with Microsoft's VM. Java is platform independent -- it compiles to bytecode instead of native code. The existance of an up-to-date java virtual machine on your target platform is not Sun's problem. When you write something using Java 1.2 features, you have to be aware that many people will not be able to run it out of the box. They may need an upgraded virtual machine or OS. Their puny RAM might not be able to handle swing. Recent versions of Java for Windows require windows 95 as a minimum (and don't claim to support XP). I don't know a whole lot about macs (except that the ones I've used have been slow, inflexible, and unreliable), but I believe OS X has been around long enough for people to upgrade. If people aren't willing to buy the software/hardware to support the latest technologies, they shouldn't be surprised when their software/hardware doesn't support the latest technologies!
Keeping the window modal to what. The OS or other windows with the application. If it is within the app, why did you have to do anything out of the ordinary? If it was to the OS. I can't stand an application that will not allow me to put it into the background or where ever I want.
JW: My application was due to run on PC's and Apple Mac's. But there were certain criteria in my program which meant interacting with the native o/s. ME: Java produces a platform-independent bytecode (virtual instructions) through its compiler. Your requirements are platform-dependent. I don't understand how Java failed you in this case. JNI is not simple, true: then again, show me any bridge between two different instruction sets that is. JW: Also the Apple macs I was designing the program for, run Classic o/s and not mac o/s X, therefore they don't support Java 1.2, and swing, JDBC 2.0. Where's the platform independence in that? ME: You're assuming that the term platform-independent (no required platform) means the same thing as platform-universal (runs on any computer without adaptation). The only thing I'm aware of that runs on all computer platforms is electrical power, and even then, you gotta have the right kind of power. If no one has yet produced the code that gets your bytecode working on your platform of choice, that's frustrating. But it's not a fault of the technology in my view. Someone's got to write that piece so everyone else can use it, that's all.
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
Well, the guys that wrote the Java language say this, and I quote "write once carefully, run anywhere conditionally" .... its just the hot air merchants at sun who twisted this to write once run anywhere ....
Its not what you do, its the way you say you've done it.
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!