A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
ecc 12:1(Ecc 12:1-14)
As Ecc 11:9-10 showed what youths are to shun, so this verse shows what they are to follow.
Creator--"Remember" that thou art not thine own, but God's property; for He has created thee (Psa 100:3). Therefore serve Him with thy "all" (Mar 12:30), and with thy best days, not with the dregs of them (Pro 8:17; Pro 22:6; Jer 3:4; Lam 3:27). The Hebrew is "Creators," plural, implying the plurality of persons, as in Gen 1:26; so Hebrew, "Makers" (Isa 54:5).
while . . . not--that is, before that (Pro 8:26) the evil days come; namely, calamity and old age, when one can no longer serve God, as in youth (Ecc 11:2, Ecc 11:8).
no pleasure--of a sensual kind (Sa2 19:35; Psa 90:10). Pleasure in God continues to the godly old (Isa 46:4).
ecc 12:2Illustrating "the evil days" (Jer 13:16). "Light," "sun," &c., express prosperity; "darkness," pain and calamity (Isa 13:10; Isa 30:26).
clouds . . . after . . . rain--After rain sunshine (comfort) might be looked for, but only a brief glimpse of it is given, and the gloomy clouds (pains) return.
ecc 12:3keepers of the house--namely, the hands and arms which protected the body, as guards do a palace (Gen 49:24; Job 4:19; Co2 5:1), are now palsied.
strong men . . . bow-- (Jdg 16:25, Jdg 16:30). Like supporting pillars, the feet and knees (Sol 5:15); the strongest members (Psa 147:10).
grinders--the molar teeth.
those that look out of the windows--the eyes; the powers of vision, looking out from beneath the eyelids, which open and shut like the casement of a window.
ecc 12:4doors--the lips, which are closely shut together as doors, by old men in eating, for, if they did not do so, the food would drop out (Job 41:14; Psa 141:3; Mic 7:5).
in the streets--that is, toward the street, "the outer doors" [MAURER and WEISS].
sound of . . . grinding--The teeth being almost gone, and the lips "shut" in eating, the sound of mastication is scarcely heard.
the bird--the cock. In the East all mostly rise with the dawn. But the old are glad to rise from their sleepless couch, or painful slumbers still earlier, namely, when the cock crows, before dawn (Job 7:4) [HOLDEN]. The least noise awakens them [WEISS].
daughters of music--the organs that produce and that enjoy music; the voice and ear.
ecc 12:5that which is high--The old are afraid of ascending a hill.
fears . . . in the way--Even on the level highway they are full of fears of falling, &c.
almond . . . flourish--In the East the hair is mostly dark. The white head of the old among the dark-haired is like an almond tree, with its white blossoms, among the dark trees around [HOLDEN]. The almond tree flowers on a leafless stock in winter (answering to old age, in which all the powers are dormant), while the other trees are flowerless. GESENIUS takes the Hebrew for flourishes from a different root, casts off; when the old man loses his gray hairs, as the almond tree casts its white flowers.
grasshoppers--the dry, shrivelled, old man, his backbone sticking out, his knees projecting forwards, his arms backwards, his head down, and the apophyses enlarged, is like that insect. Hence arose the fable, that Tithonus in very old age was changed into a grasshopper [PARKHURST]. "The locust raises itself to fly"; the old man about to leave the body is like a locust when it is assuming its winged form, and is about to fly [MAURER].
a burden--namely, to himself.
desire shall fail--satisfaction shall be abolished. For "desire," Vulgate has "the caper tree," provocative of lust; not so well.
long home-- (Job 16:22; Job 17:13).
mourners-- (Jer 9:17-20), hired for the occasion (Mat 9:23).
ecc 12:6A double image to represent death, as in Ecc 12:1-5, old age: (1) A lamp of frail material, but gilded over, often in the East hung from roofs by a cord of silk and silver interwoven; as the lamp is dashed down and broken, when the cord breaks, so man at death; the golden bowl of the lamp answers to the skull, which, from the vital preciousness of its contents, may be called "golden"; "the silver cord" is the spinal marrow, which is white and precious as silver, and is attached to the brain. (2) A fountain, from which water is drawn by a pitcher let down by a rope wound round a wheel; as, when the pitcher and wheel are broken, water can no more be drawn, so life ceases when the vital energies are gone. The "fountain" may mean the right ventricle of the heart; the "cistern," the left; the pitcher, the veins; the wheel, the aorta, or great artery [SMITH]. The circulation of the blood, whether known or not to Solomon, seems to be implied in the language put by the Holy Ghost into his mouth. This gloomy picture of old age applies to those who have not "remembered their Creator in youth." They have none of the consolations of God, which they might have obtained in youth; it is now too late to seek them. A good old age is a blessing to the godly (Gen 15:15; Job 5:26; Pro 16:31; Pro 20:29).
ecc 12:7dust--the dust-formed body.
spirit--surviving the body; implying its immortality (Ecc 3:11).
ecc 12:8A summary of the first part.
Vanity, &c.--Resumption of the sentiment with which the book began (Ecc 1:2; Jo1 2:17).
ecc 12:9gave good heed--literally, "he weighed." The "teaching the people" seems to have been oral; the "proverbs," in writing. There must then have been auditories assembled to hear the inspired wisdom of the Preacher. See the explanation of Koheleth in the Introduction, and chapter 1 (Kg1 4:34).
that which is written, &c.--rather, (he sought) "to write down uprightly (or, 'aright') words of truth" [HOLDEN and WEISS]. "Acceptable" means an agreeable style; "uprightly . . . truth," correct sentiment.
ecc 12:11goads--piercing deeply into the mind (Act 2:37; Act 9:5; Heb 4:12); evidently inspired words, as the end of the verse proves.
fastened--rather, on account of the Hebrew genders, (The words) "are fastened (in the memory) like nails" [HOLDEN].
masters of assemblies--rather, "the masters of collections (that is, collectors of inspired sayings, Pro 25:1), are given ('have published them as proceeding' [HOLDEN]) from one Shepherd," namely, the Spirit of Jesus Christ [WEISS], (Eze 37:24). However, the mention of "goads" favors the English Version, "masters of assemblies," namely, under-shepherds, inspired by the Chief Shepherd (Pe1 5:2-4). SCHMIDT translates, "The masters of assemblies are fastened (made sure) as nails," so Isa 22:23.
ecc 12:12(See on Ecc 1:18).
many books--of mere human composition, opposed to "by these"; these inspired writings are the only sure source of "admonition."
(over much) study--in mere human books, wearies the body, without solidly profiting the soul.
ecc 12:13The grand inference of the whole book.
Fear God--The antidote to following creature idols, and "vanities," whether self-righteousness (Ecc 7:16, Ecc 7:18), or wicked oppression and other evils (Ecc 8:12-13), or mad mirth (Ecc 2:2; Ecc 7:2-5), or self-mortifying avarice (Ecc 8:13, Ecc 8:17), or youth spent without God (Ecc 11:9; Ecc 12:1).
this is the whole duty of man--literally, "this is the whole man," the full ideal of man, as originally contemplated, realized wholly by Jesus Christ alone; and, through Him, by saints now in part, hereafter perfectly (Jo1 3:22-24; Rev 22:14).
ecc 12:14For God shall bring every work into judgment--The future judgment is the test of what is "vanity," what solid, as regards the chief good, the grand subject of the book.