This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes static initializer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "static initializer" Watch "static initializer" New topic
Author

static initializer

rob harvey
Greenhorn

Joined: Apr 05, 2002
Posts: 25
Hi - if a java.lang.error is thrown from a static initializer will this mean the class is unusable thereafter as it hasn't loaded properly? I ask this as I am loading a dll in my initializer - when it is not on the path an unsatisfiedlinkerror is thrown. When I then go to call the native method it hangs without ever returning. When I catch the error in the static block however the native method call correctly throws its own unsatisfiedlinkerror and doesn't hang?
rob harvey
Greenhorn

Joined: Apr 05, 2002
Posts: 25
I've answered this myself. If the class fails to initialise it is unusable.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static initializer
 
Similar Threads
UnsatisfiedLinkError
UnsatisfiedLinkError
UnsatisfiedLinkError
UnsatisfiedLinkError
UnsatisfiedLinkError