Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37449
| From | Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Are Outer Classes Loaded Lazily? |
| Date | 2017-09-22 15:55 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <oq3pru$tkk$1@dont-email.me> (permalink) |
| References | <opu86b$k29$1@news.albasani.net> <oq13am$9v4$1@gwaiyur.mb-net.net> <oq16v8$sn$1@dont-email.me> <oq2k6k$9b6$1@news.albasani.net> |
On 9/22/2017 5:12 AM, j4n bur53 wrote: > Yes I am interested in loading and not in > intialization. Unfortuantely I have not yet > managed to add some good load tracing > > to my app. The suggestion -verbose:class > is a command line option, but since I have > anyway a custom class loader, > > maybe I can switch on/off the verbose > flag programmatically or pipe my own logging > message to somewhere, to figure out > > whats going on... The JVM defines roughly 5 distinct stages of loading: "Loading" == "find the bytes that make up this class" "Verifying" == "make sure the bytes are a valid .class file" "Preparing" == "allocate the backing memory for statics" "Resolving" == "make sure that references in opcodes are legal" "Initializing" == "call <clinit>" The spec also uses the term "linking" as a catch-all for the latter 4 steps, but also states that when the stages actually happen are flexible. Only the last step is strictly controlled by the JVM. It's really vague when loading may occur, but it needs to occur no later than the resolution step. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-20 19:23 +0200
Re: Are Outer Classes Loaded Lazily? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-09-20 17:45 -0400
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-21 01:18 +0200
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-20 17:28 -0700
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-21 09:29 +0200
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-21 09:40 +0200
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-21 11:44 -0700
Re: Are Outer Classes Loaded Lazily? Marcel Mueller <news.5.maazl@spamgourmet.org> - 2017-09-21 21:18 +0200
Re: Are Outer Classes Loaded Lazily? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-09-21 16:20 -0400
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-22 11:12 +0200
Re: Are Outer Classes Loaded Lazily? Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2017-09-22 15:55 -0400
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-23 18:33 +0200
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-22 13:48 -0700
Re: Are Outer Classes Loaded Lazily? Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2017-09-22 23:46 -0400
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-25 13:23 -0700
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-24 17:39 +0200
Re: Are Outer Classes Loaded Lazily? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-09-25 07:38 -0400
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-25 13:25 -0700
csiph-web