Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 20 Jun 2011 19:02:15 -0500 Date: Mon, 20 Jun 2011 17:02:16 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: CLI Java Glitch References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <08-dnSujmMAaQmLQnZ2dnUVZ_q-dnZ2d@earthlink.com> Lines: 52 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.204.39 X-Trace: sv3-llP+Uag4IL50sQWM3ZaMCpjW538BiNKVRFzkrrLpRVXgS6aVQGV12YLKsPdO2MKK0KbUGdUe8uObs9E!P0F1vZFu8T94A4WFxz7hMQzk96nXuZD/5xOxadcvdZdszb1xyoW3evwAirRJyx2UlGuThKf5MeHM!Wt8f4IVT7chVbkkrBoW3kNwc6p8uV1fKPCEYyTgGwBUn0w== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3088 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5447 On 6/20/2011 4:25 PM, Lew Bloch wrote: > On Jun 20, 4:11 pm, Jeff Higgins wrote: >> On 06/20/2011 05:24 PM, 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? >> >>> C:\cbs2dev\test>java helloworld >> >> maybe a wrapper script > > That would not help in this case. Think about the problem and you > will see why. > > OK, I'll tell you why. Wrapper scripts don't help in the face of > egregious error. > > Perhaps you should be specific with your suggestion. "Maybe a wrapper > script" is about as useful as advice as "maybe a program to help > you". Could you elucidate precisely what sort of "wrapper script" you > have in mind, and precisely how you believe it would help, and > precisely how that would ameliorate egregious error? I can see a couple of ways a script could help: 1. Create a helloworld.bat script (I'm assuming, given the wish to ignore case, that this is MS-Windows specific) that runs the java command with the correct spelling of the class name. Users who run the script could ignore case. 2. Create a general script, javaignorecase.bat, that takes the same parameters as the java command. It would scan the class path for classes. If it found one that matches its class name argument ignoring case, it would run the java command substituting the actual class name for its class name argument and passing through the rest of the arguments unchanged. Personally, I don't like things that ignore case, but that is a far from universal view. Patricia