- PeterMoulding.com
- Author
- Trainer
- Speaker
- Business Coach
- How to write a How To book
- PHP Courses
- Speaking
- Web Architect
- Australia
- Books
- Authors
- Akkana Peck
- Alex Berenson
- Andrew Nugent
- Ben Sanders
- Brock Clarke
- Chris Simms
- David Mercer
- Dianna Mullet
- Don Winslow
- Dori Smith
- Harlan Coben
- Jack McDevitt
- James Wines
- Jerry Yudelson
- John Grisham
- Kevin Mullet
- L. E. Modesitt Jr.
- Laurell K. Hamilton
- Marshall Karp
- Martina Cole
- Michael Marshall Smith
- Michel Roux Jr
- Nadia Sawalha
- Philip Pullman
- Raymond Khoury
- Richard North Patterson
- Robert Masello
- Sally Roth
- Sarah Langan
- Stella Rimington
- Stephen Booth
- Stephen King
- Stephen Leather
- T.C. Boyle
- Tom Negrino
- Tony Hillerman
- Urban Waite
- Val McDermid
- Valerio Massimo Manfredi
- Beginning GIMP
- Beginning Visual C++
- Culturalism
- Fiction
- A Drink Before The War
- A Talent for War
- Bag of Bones
- Blood and Ice
- Burn
- Dark Lady
- Dead Line
- Eclipse
- Empress of Eternity
- Exley
- Flipping Out
- Just One Look
- Nightfall
- Pet Sematary
- Savage Moon
- Skinwalkers
- Starvation Lake
- The Fallen
- The Gardens of the Dead
- The Jump
- The Last Templar
- The Mermaids Singing
- The Midnight Mayor
- The Secret Soldier
- The Summons
- The Terror of Living
- The Testament
- The Tower
- Under the Dome
- Virus
- AJAX and PHP
- Aging with Grace
- Food books
- Green Architecture
- Life Is So Good
- SQL: The Complete Reference
- The Backyard Bird Lover's Ultimate How-to Guide
- The Garden Gurus
- Authors
- Sustainability
- -18 hours left to decide the future of Australia
- Campbells vegetable stock or Massel vegetable stock?
- Carbon Sequestration
- Carbon tax for Australia is a fraud
- Copenhagen will fail
- Cost of living in Australia
- Dick Smith jumps on the population bandwagon
- Dry Run: Preventing the Next Urban Water Crisis
- Energy Saving Lights
- Garlic
- How many people can live in Australia?
- Its obsolete, throw it out!
- Julia Gillard offers 9.9 billion dollars bribe to Rob Oakeshott
- Laundry detergent
- Petrol or Diesel?
- Reflective foil batts kill
- RoHS
- Sea level to rise 3mm due to climate change
- Solar power
- Spring again in Sydney
- Sustainable fuels
- The CRUD Tax is back
- The people who make building regulations do not own houses
- Water efficiency
- Which insulation is safer, foil or wool?
- Will Australia reduce greenhouse gas emissions?
- Technology
- Android or Blackberry or iPhone or a flip phone?
- Apple versus Google 2011
- Cameras
- Cars
- Colour
- Burgundy
- Colour Blindness
- Colour Names
- Dulux colours
- Pantone colours
- Safe Colours
- Seculine ProDisk Mini colour balance card
- What Causes Colour Blindness?
- Hardware
- Batteries for the Digital Age
- Cables
- Cases
- Computer reliability
- Computrace
- Disks
- Astone ISO Gear 481E
- Best SSD for your notebook computer
- Disk block size
- Hitachi disk HDS722020ALA330
- LaCie USB 2.0 250 GB mobile hard drive design by F.A. Porsche
- SMART disk
- Samsung 2 TB HD204UI quiet low power disk for mass storage
- Seagate and Samsung merge disk business
- Select the right disk for your RAID array
- USB disk speed
- Western Digital WD20EARX 2 GB SATA 3 disk
- How long should computer hardware last?
- Keyboards
- Mainframe
- Memory cards
- Monitors
- Netbooks, notebooks, tablets, and xPads
- Network Attached Storage
- OLED Displays
- PC's are a thing of the past
- Printers
- Quiet
- Samsung Galaxy S
- Speed
- Television
- Tools
- USB
- Worst computer movies
- Xserve is dead. What next?
- Your backup will not work
- Z68 motherboards
- iPad or Acer Aspire One?
- IQ
- LG Intello Washing Machine
- Lack of a challenge
- Networks
- 802.11n wireless networking
- D-Link DIR-655 wireless router
- D-Link DWA-160 Xtreme N dual band USB adapter
- D-Link DWA-556 Xtreme N PCI Express desktop adapter
- MIMO
- NBN spends another $12 billion of our tax money on nothing
- National Broadband Network
- Netgear wireless modem router DGND3300 with 300 Mbps 802.11n
- Refrigerator kills wireless broadband
- Small Wireless Network
- TP-LINK TL-SG10005D 5 port gigabit switch
- TP-Link TL-WR1043N wireless N gigabit router
- Telstra Pre-paid Mobile Wi-Fi
- Where are the router plus proxy server combinations?
- Open Source documentation
- Software
- 7-zip
- Accounting
- Asterisk
- Audacity
- Backup software
- Bloat only in Windows
- CAD
- CDex
- Disk imaging software for copying and backup
- Exact Audio Copy
- Filezilla
- Firefox
- Java
- LibreOffice or OpenOffice?
- Linux
- 1 in 5 servers will ship with Linux
- Android phones outsell iPhone
- Another Move to Linux
- CentOS 5.5 installation on SSD and RAID 5
- Debian
- Debian 5.0.5 AMD64 installation
- Debian 5.06 installation
- Fedora
- Fedora or Ubuntu?
- Gnome or KDE?
- K9copy
- Linux 2.6.38
- Linux Gnome login settings lost
- Linux Mint
- Linux RAID, a rant
- Linux Speed
- Linux Time
- Linux reliability as demonstrated by Ubuntu 10.10
- Linux reliability as demonstrated by Ubuntu 11.4
- Linux still a struggle in 2011
- Linux workstation disk RAID 1
- Linux, NT, Windows, and SETI
- Linux, three years of progress
- London Stock Exchange switches to Linux
- Mandrake Linux 9.2
- The partition is misaligned by 48128 bytes - warning from Linux RAID
- Ubuntu
- How to fix the scroll bars in Ubuntu 11.4 Gnome
- Kubuntu 10.10 alternate installation on desktop with RAID 1
- POWbuntu
- Ubuntu 10.10 after 6 months use
- Ubuntu 10.10 alternate installation
- Ubuntu 10.10 desktop RAID 1
- Ubuntu 10.10 desktop RAID 5
- Ubuntu 10.10 desktop install on a netbook
- Ubuntu 10.10 desktop installation
- Ubuntu 10.10 netbook install on a netbook
- Ubuntu 10.10 server AMD64
- Ubuntu 10.10 upgrade to version 11.4 beta 2
- Ubuntu 10.4
- Ubuntu 11.10
- Ubuntu 11.10 first upgrade
- Ubuntu 11.4 after one month use
- Ubuntu 12.04 beta1 desktop amd64
- Ubuntu One
- Ubuntu by Microsoft?
- Ubuntu desktop upgrade 10.4 to 10.10 failed because I did not check the media
- Ubuntu strikes again
- Upgrade Ubuntu to Linux Mint 12 LDXE for extra speed
- Yes, use Linux but not that distribution!
- Nero
- OpenOffice
- OpenOffice is now Apache Office
- Project management
- Scribus
- Software for Windows and Linux
- Text editors
- Time
- Todo applications
- Tomboy notes
- Top text editors
- Version control
- VideoLAN VLC media player
- Visio
- Webmin
- Webmin installation on CentOS for Web development
- Webmin installation on Ubuntu
- What is the most popular open source software today?
- Windows
- Another Windows person goes Linux
- BAD_POOL_CALLER
- Cygwin
- Microsoft Malicious Software Removal Tool cannot find a common virus
- One of the developers of Windows XP is criminally insane
- There are unused icons on your desktop
- W32time
- Which Windows version?
- Windows 7 Home Premium
- Windows XP Stop 0x0000007B during installation
- Windows XP is a disaster
- Windows processes
- XML
- Zip, bzip, gzip, or 7zip?
- configFree
- Technology Succession Planning
- VoIP
- Web Sites
- Drupal
- Do Drupal themes have to use the GPL?
- Drupal 7
- A better search facility for Drupal
- Drupal - performance or flexibility
- Drupal 7 Fields are hard to fix
- Drupal 7 new features
- Drupal 7 ships on January 5
- Drupal 7.14
- Drupal 7.4 hits PeterMoulding.com
- Drupal function sequence
- The evolution of a module
- Undefined index: headers in DefaultMailSystem->mail() (line 54 of /modules/system/system.mail.inc).
- Undefined index: to in DefaultMailSystem->mail() (line 83 of /modules/system/system.mail.inc).
- implode(): Invalid arguments passed in DefaultMailSystem->format() (line 23 of /modules/system/system.mail.inc).
- Drupal 8
- Drupal Code Load Cut
- Drupal How To
- Drupal Modules
- Backup and Migrate
- Browscap
- CKEditor with Drupal WYSIWYG
- Captcha
- Cel
- Colorbox
- Content Construction Kit
- Content type
- Devel module for Drupal
- Drupal Rules as an automation language
- Drupal Spam add-on module
- Form alter to node
- IMCE
- IMCE Wysiwyg bridge
- ImageAPI
- Jdog
- Lightbox2
- Module variable
- Node Gallery Access
- Node_Gallery
- Path
- Path redirect
- Pathauto
- Pet
- Search
- Service links
- Session Variable
- Statistics
- Taxonomy
- Token
- Token ex
- Transliteration
- Trigger
- Watch
- Other modules
- Drupal Training
- Drupal access controls need a major rewrite
- Drupal coding tricks
- Drupal performance
- Drupal themes for the future
- Drupal.org colours
- Import existing data into Drupal
- Multiple Web sites made easy using Drupal multisite and the right start
- drupal_lookup_path()
- Adobe PDF
- Apache
- Apache Mahout
- Audi.com
- Bleet
- CSS Strikes Again
- CSS or xCSS
- Can you believe Facebook or email?
- Content Management Systems
- Databases
- Facebook scam
- Font
- Fonts
- HTML
- Install Apache, MySQL, and PHP 5 in Ubuntu 11.4 using the Ubuntu Software Centre
- Language Codes
- Marketing
- Memcache
- Nginx
- Open source development hits another roadblock
- Oscars
- PHP
- SPDY
- Search software
- Techoni.com.au
- Theme themes
- Things to hate on Web sites
- U.S. Patent No. 6,985,875
- Virtual Private Server
- Visible Improvement
- Web 4.0
- Web browser usage
- Web browsers
- Web site development
- Bluefish
- Crying over spilt code
- Eclipse and PHP
- Getting a Git client, a story of ancient technology and pain
- HTTrack
- MVC
- Netbeans
- PHP or ..., CakePHP/Symfony/ZF versus ...
- Programming
- Superfish
- Web browser emulators for testing your Web site
- Web development frameworks
- Web site books
- Web site development on your own computer
- Webmin or phpMyAdmin or cPanel for creating databases?
- aiki framework
- jQuery
- Views development - Learn Fields first
- Views development - Learn Actions and Rules
- jQuery .each()
- jQuery .has()
- jQuery .is()
- jQuery and Firefox Firebug
- jQuery children
- jQuery for people not using Drupal - Installation and getting started
- jQuery hover
- jQuery hover de-duplication example
- jQuery or CSS?
- jQuery performance
- jQuery tests
- Web site hosting
- Westpac Web site still broken after two years and ten months
- Wordpress wins another CMS survey
- Drupal
Java
Submitted by Peter on Thu, 2004-10-07 00:00
Updated Sept 2010
Java is famous for the write once, run anywhere
sales pitch. Apache, Firefox, and OpenOffice are examples of widely used run anywhere
programs but none of them need Java, proving Java is irrelevant to where a program runs. How close is Java to write once, run anywhere
?
Java is was from Sun, Sun is now owned by Oracle, and Oracle are rebranding all of Sun's software as Oracle. Sun is was famous for the Java write once, run anywhere
sales pitch. There is a huge range of software that works everywhere were Java works and works without a line of Java code. For a long time, much of that non Java code worked more reliably than Java in most of the popular operating systems.
Do You really Want to Write Once?
Do you really want to limit your programs to doing things just one way? The Apache Web server runs on every useful operating system plus a few others. Some operating systems have multitasking, some multithreading, and some have both. Apache version 1 was written for a multitasking operating system so could not use multithreading. Apache 2 is built so it can use any combination by rewriting part of Apache for each operating system. The Apache 2 style flexibility is often more important than trying to make everybody do things the one way.
The popularity of Unix was built on the ability to write Unix many times for many uses. You could get the best out of a Unix system by making Unix use the best features of the underlying hardware. Now there are Unix users saying we should adopt the restricted range of Java. Their Java doublespeak clashes directly with the reasons for using Unix.
Jedit is an example of a write once
program and it sucks on a Windows platform because all the menus are wrong, the keyboard shortcuts are different. You cannot jump back and forth between Jedit and other Windows based programs because of the continual annoying differences. If jEdit was rewritten in a normal programming language and used one of the normal non Java user interfaces, jEdit could work the Windows way on Windows, the Linux way on Linux, and have the option to work the other way on each operating system for the benefit of people using two operating systems in parallel.
OpenOffice works on Windows because the authors set out to copy a Windows based application. Most Java based applications have the Jedit write once
problem.
GTK
You can write once
and have a program run correctly on any operating system by separating out the user interface into a custom layer that is rewritten for each operating system. Java applications could be vastly improved by adopting the separate layer approach. GIMP did it successfully long before Java. GIMP's user interface is now supplied separately as GTK.
Everyone installs the right version of GTK for their operating system, just as you do with Java. When you install a GTK based application, the application gets the right user interface, something Java still fails to deliver.
The GTK approach gets you closer to the ideal of write once, run everywhere with the right user interface
.
Cygwin
Cygwin gives you Unix under Windows, which is another approach to the write once idea. I used Cygwin on NT. NT was a POSIX compliant operating system with the Windows user interface. If you stepped from Unix to NT, you could choose between easy Windows programs and cryptic Unix command line programs.
Cygwin added more Unix to NT so you could use Unix shell scripts in NT. If you mostly worked on Unix servers and occasionally on NT, you could use your Unix scripts on NT.
Java has a layer that works a bit like Cygwin but instead of adding to the operating system functions, the Java layer restricts you range. You then have to use Cygwin or GTK style tricks to make full use of an operating system. Out of the Java, Cygwin, and GTK approaches, I find GTK produces the best applications.
Write Several
There are lots of write several
programs. You find they have downloadable versions for Linux and Windows with Solaris the third option then a variety of Unixes popping up after the release of the Solaris version. Now that Apple have dumped their operating system in the bin and switched to Unix, the Apple Unix version usually appears soon after Solaris. Of the hundred applications I use during the average day, half are cross platform products and most of the cross platform applications are write several, run most places
.
write several
sounds bad until you realise you change only a tiny fraction of your code when you change operating systems. For many years Java failed the write once, run anywhere
test because you had to rewrite your Java programs to get around all the errors in Java that appeared in each operating system. Recently the Java people finally fixed Java so it could handle fonts on more than one operating system. GTK did that years ago because the GTK approach is more focused.
Unix Bigots
Part of the move to Java is to satisfy the problem created by Unix having so many different varieties. Unix bigots started selling Java as write once, run anywhere
when Java first ran on more than one variety of Unix. I exchanged words with one of those bigots in a news group.
All I did was try a Java based program on an operating system which was not Unix then post a question about a Java limitation in a newsgroup. Bang, one Unix bigot jumped on my post and blasted me for daring to use the run anywhere
Java on anything other than Unix. The bigot then commanded me to upgrade
Windows to Linux.
I could have pointed out that I was not using Windows or that Linux is not Unix. Instead I looked through the posts in the newsgroup and noted that the Java based application failed to run on several version of Unix because of Java problems. Pow! The Unix/Java bigot just about burst a blood vessel.
You do not make a program run anywhere
by making it half work on most operating systems. Some background service programs can run like that because they use only the Internet and do not have a user interface. That is a popular approach for Unix utilities running under Cygwin on NT. For everything else, you need a program that works like the other programs on the same operating system.
Cars
Using the same interface and keystrokes across programs lets people jump from program to program without slowing down. The car industry learnt that years ago. My European car works almost exactly the same as my wife's Japanese car. The only difference is that my Volvo has the indicator switch on the opposite side to my wife's car. That one little difference is painfully obvious when I drive the other car.
You can imagine how painful it is to try to use a Java application that has everything different. Try to think of a car with the brake pedal and accelerator switched around. What would happen to you if you were driving it for the first time and had to slam on the brakes to avoid an accident? How much delay would there be while you try to remember which pedal is the brake?
JRE or SDK
Java is supplied as the 15 MB JRE (Java Runtime Edition) or the 50 MB SDK (Software Development Kit). Most Java applications use only the JRE. Some Java applications give you the choice of downloading the application with or without Java. You save download time by downloading the Java JRE once then downloading the smaller versions of Java applications.
Some applications require the full SDK which goes against one of the main reasons for using Java. Suddenly you have to use a different version of Java. In the end I deleted that badly designed application and went back to using only the JRE. Do not install the SDK unless you definitely need it and complain to software developers who ask you to use the SDK instead of the JRE.
1.3, 1.4.1, 1.4.2, or 5?
Java 1.3 is the last version of Java to have an acceptable licence. 1.4.1 is the first version of Java to work on most platforms. 1.4.2 is the current thoroughly tested version. The latest version of Java, which should be called 1.5, is now labelled version 5. In version 5 the SDK is named the JDK (Java Development Kit). The version 5 JRE looks to be the same as the 1.4.2 JRE.
Ongoing problems
Lack of testing
I tried to delete Java from one computer, because I was not using Java on that computer, and the Java uninstall process destroyed the computer. To be exact, it corrupted all the active programs, the operating system, and required a serious time consuming recovery effort to make the computer usable again. This was not an old version of Java. It was a version installed only a month or two before I activated the uninstall process. After 15 years of development, Java is still not tested properly, not even to the to sometimes low professional standards of Microsoft. Now I refuse to install Java on any computer I need on a daily basis.
I use a lot of mobile phones (cell phones) and and other handheld devices. Most work reliably all the time. The few that show weird behaviour and truly stupid errors are Java based devices. Java based phones are going through that incredibly long process of trying to make Java work for more than a short time without screwing up. Java on desktop computers required almost 15 years to make it last a whole day without failure. After 15 years, the desktop Java is down to one screw up per week. Mobile phones based on Java screw up several times a day, the way Java did ten years ago and was still doing many years later. Will Java based phones require five years or ten years to become reliable?
The one thing that might save Java on mobile phones is the use of some Java by Google on their Android. Google do not use Java from Oracle for the same reason Microsoft did not use Java from Sun, Google and Oracle are deadly enemies in the war to control your computer and spending. Google use the open source Java work-alike, named Harmony, from the Apache foundation. Naming the Java replacement Harmony is equivalent to naming one of the atomic bombs dropped on Japan sweetness and light
.
Google use a run time environment named Dalvik and Oracle is suing Google over possible patent infringement in Dalvik. Most of the ideas behind run time environments work discussed in the 1980s so how could Oracle have a patent based on software that was not started until 1995?
Conclusion
Java still has a long way to go before it is write once, useful everywhere
. The Apache Foundation and Google might sdolve that problem with Harmony and Dalvik.
GTK version 2 looks like the best generic user interface for Java based applications and more Java developers should switch to GTK. They should then work on replacing the Java code with code based on a real programming language.








