Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: CLI Java Glitch Date: Mon, 20 Jun 2011 22:09:18 +0000 (UTC) Organization: UK Free Software Network Lines: 45 Message-ID: References: NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1308607758 20763 84.45.235.129 (20 Jun 2011 22:09:18 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Mon, 20 Jun 2011 22:09:18 +0000 (UTC) User-Agent: Pan/0.133 (House of Butterflies) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5442 On Mon, 20 Jun 2011 14:24:53 -0700, Gene Wirchenko wrote: > Dear Java'ers: > > Given > > class HelloWorld > { > public static void main(String[] args) > { > System.out.println("Hello, world!"); > } > } > > is there any way around the following? > Nope: out it down to the non-intuitive ways some OSen handle file names. There's a big difference between: (1) an OS that stores a file name as input but does caseless name comparisons when parsing a request to find a file (Windows from Win95 onwards) and (2) one that converts file names to, say, upper case when they're stored and *then* does caseless comparisons. (DOS, Windows to 3.11) or (3) one that stores file names as entered and does case-sensitive comparisons. (all UNIX family OSen) The Java language system does case-sensitive comparisons between class names and the files that contain them when checking that a class name matches the file name that contains it or when the class-loader is looking for a classfile, so it will behave as a person used to case 2 or 3 would expect, but you'd better get the case right if you're using a case 1 OS. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |