Path: csiph.com!usenet.pasdenom.info!gegeweb.org!goblin2!goblin.stu.neva.ru!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Wanja Gayk Newsgroups: comp.lang.java.programmer Subject: Re: "Small" Program Challenge. Date: Wed, 20 Jun 2012 13:11:17 +0200 Organization: Netfront http://www.netfront.net/ Lines: 37 Message-ID: References: <4fde76ce$0$287$14726298@news.sunsite.dk> <7kIDr.12088$Bp1.3039@newsfe10.iad> NNTP-Posting-Host: 77.8.46.94 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1340190675 60212 77.8.46.94 (20 Jun 2012 11:11:15 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Wed, 20 Jun 2012 11:11:15 +0000 (UTC) User-Agent: MicroPlanet-Gravity/3.0.4 Xref: csiph.com comp.lang.java.programmer:15507 In article , -@. says... > It's just the order that things are done by default. > > Before the code was: > > 1. Load class with initialization. > 2. Run 'main' method. > > Now, they do the special step of loading without initialization: > > 1. Load class without initialization. > 2. Verify 'main' method, throw error if not present > 3. Initialize class > 4. Run 'main' method. > > You can see how the new method takes more effort. I'd rather see it as an extension of the bytecode validation mechanism, that has to exist anyway: 1. Load bytecode 2. Validate bytecode (exits if there is no 'main' method for the main class) 3. Initialize class 4. Run 'main' method. Kind regards, Wanja -- ..Alesi's problem was that the back of the car was jumping up and down dangerously - and I can assure you from having been teammate to Jean Alesi and knowing what kind of cars that he can pull up with, when Jean Alesi says that a car is dangerous - it is. [Jonathan Palmer] --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---