Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "javax.swing.JSnarker" Newsgroups: comp.lang.java.programmer Subject: Re: "Small" Program Challenge. Date: Wed, 20 Jun 2012 21:05:32 -0400 Organization: media lab? Lines: 35 Message-ID: References: <7kIDr.12088$Bp1.3039@newsfe10.iad> <4291u795eegvb0j8b09lvqkng3hh13t336@4ax.com> <4732eeb4-9d34-4765-ba6d-c098f0528038@googlegroups.com> <2P2dnb8yuIyntXzSnZ2dnUVZ8hGdnZ2d@giganews.com> NNTP-Posting-Host: y4noUEMC8u/SvRWFa5JPRw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: NewsTap/3.5.5 (iPhone/iPod Touch) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:15474 On 19/06/2012 9:32 PM, Leif Roar Moldskred wrote: > javax.swing.JSnarker wrote: >> On 19/06/2012 9:01 PM, Leif Roar Moldskred wrote: >>> >>> As has been pointed out earlier in the thread, that's exactly what >>> happens when, with Java 7, you try to start a Java program with a >>> class that does not contain a valid main method. >> >> And as has been pointed out earlier in the thread, that contravenes the >> spec, which says initialization occurs *before* invocation. > > I disagree that it contravenes the spec, but regardless it is an > example of "real code where a static method began to be invoked and > the class was still not initialized." Which would contravene the spec, since the spec clearly says that initialization must *precede* invocation. > Of course, that's assuming that we consider Java 7 to have "begun to > invoke" the missing main method, but if not, the rest of your argument > falls through. Lew considers it to have "begun to invoke" the missing main method, as is apparent when he says it attempts to invoke the missing method first. So if Lew is correct, then the behavior is out of spec. On the other hand, if Lew is wrong, then the argument I made for why if Lew was correct the behavior is out of spec falls through, but was moot anyway. -- public final class JSnarker extends JComponent A JSnarker is an NNTP-aware component that asynchronously provides snarky output when the Ego.needsPuncturing() event is fired in cljp.