This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static initializer

 
rob harvey
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've answered this myself. If the class fails to initialise it is unusable.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic