Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Java claims WORA Date: Wed, 20 Jun 2012 16:43:21 -0700 Organization: Canadian Mind Products Lines: 32 Message-ID: <40o4u71gpg9lmptbffe2k5e6da6ggcdo8a@4ax.com> References: <8bc88bdc-bd63-4dd2-ba6c-cb0a7622fa1f@googlegroups.com> Reply-To: Roedy Green NNTP-Posting-Host: Z2l1DcCELS0rATq8NqV4Sw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: csiph.com comp.lang.java.programmer:15468 On Wed, 20 Jun 2012 08:33:02 -0700 (PDT), owais wrote, quoted or indirectly quoted someone who said : >Java claims WORA (write once and run anywhere). >Do you agree with this statement that all java programs >can be run anywhere (all platforms)? Can you identify a >scenario where this claim may not hold true? The caveats are: 1. If your code is written for Java 1,7 you must have a Java 1.7+ runtime. It might not be available for a given platform. 2. a given JVM might have a bug that stops some particular program from working. 3. If you use JNI, you must have the appropriate native code for the given platform. 4. Java does requires the programmer to handle the WORA stuff explicitly for file names and line separators and encodings. Simple programs will work fine, but more complex ones must be aware. -- Roedy Green Canadian Mind Products http://mindprod.com If you look in a computer programmer's freezer you will find all kinds of containers, but none of them labeled. They do the same thing creating files without labeling the encoding. You are just supposed to know. Ditto with the MIME type, the separator and comment delimiters and column names in CSV files. Ditto with the endian convention. Imagine how much more civilised life would have been if Martha Stewart were the first programmer.