On Wed, 26 Jan 2011 14:42:34 -0800 (PST)
Paul  Mooser <taron...@gmail.com> wrote:

> I've been working on getting clojure integrated into the build system
> at work, and it appears that classes are being loaded (which is not
> surprising to me) and initialized (which was somewhat surprising to
> me) as part of the compilation process.
> 
> Does anyone happen to know why this is ? I would have assumed that for
> the purpose of compilation, it would be sufficient to load classes
> without initializing them, but I have no real basis for that
> assumption.
> 

Accessing external resources from static initializers can be problematic at 
compile time.

For example Log4j usually complains that it cannot find its configuration at 
compile time.
This specific case is a minor issue, it does not have any impacts except the 
two messages
printed on stdout (or stderr).

Just make sure you are doing simple things in the class static initializers 
without any
odd side effects.

-- 
Luc P.

================
The rabid Muppet

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to