Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news6 From: Michael Wojcik Newsgroups: comp.lang.java.programmer Subject: Re: CLI Java Glitch Date: Thu, 23 Jun 2011 15:13:20 -0400 Organization: Micro Focus Lines: 32 Message-ID: References: NNTP-Posting-Host: p0250030064c749344fc6872706467af9890c7fe85dab8d3a.newsdawg.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5641 Gene Wirchenko wrote: > > Look at it this way. If Java were being spec'ed right now, would > you have an objection to what I propose? Why not make it easier? Yes, because it misunderstands the nature of what the java executable is doing in that use case (as I noted in another message, which I believe was posted after you wrote the one I'm quoting here, so you won't have seen it). When you run "java foo", you are asking the java executable to create a JVM instance, load a class named "foo", instantiate it, find its "main" method, and execute it. As it happens, on most OSes, when the java executable is asked to load a class and is not given any other information about where that class resides, it searches a configurable list of filesystem locations for a file with the same name as the class, plus the extension ".class". It is conceivable that in environments where this doesn't make sense, a java executable, or its equivalent, could do something else to load the named class. You are *not* telling the java executable to open the file "foo.class" and muck about in it, trying to find some class with a main method to execute. Your proposal sets the cart before the horse. -- Michael Wojcik Micro Focus Rhetoric & Writing, Michigan State University