The Artima Developer Community
Sponsored Link

Java Buzz Forum
NoClassDefFoundError vs ClassNotFoundExcepiton in Java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
NoClassDefFoundError vs ClassNotFoundExcepiton in Java Posted: Dec 10, 2012 7:13 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: NoClassDefFoundError vs ClassNotFoundExcepiton in Java
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
Both NoClassDefFoundError and ClassNotFoundException are dreaded Error which comes when JVM or ClassLoader not able to locate class during class loading process. Since different ClassLoader loads classes from different location, sometime this issue may caused because of incorrect CLASSPATH as well i.e. some JAR files from lib is mission or from old version. Though look quite similar there is subtle difference between NoClassDefFoundError and ClassNotFoundException, NoClassDefFoundError indicates that class was present during time of compilation but not available when you run Java program, some time error on static initializer block can also result in NoClassDefFoundError. On the other hand ClassNotFoundException is nothing to do with compile time, ClassNotFoundException comes when you try to load a class in runtime using Reflection, e.g. loading SQL drivers and corresponding Class loader is not able to find this class. Apart from this fundamental difference between NoClassDefFoundError and ClassNoFoundException in Java, let's see some more points for better understanding.
Read more ยป

Read: NoClassDefFoundError vs ClassNotFoundExcepiton in Java

Topic: TaskletStep Oriented Processing in Spring Batch Previous Topic   Next Topic Topic: Session Timeout Handling on JSF AJAX request

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use