ClassNotFoundException cause and solution.

The cause of ClassNotFoundException is simpler compared to NoClassDefFoundError.

This error occurs when you use Class.forName().

In most cases, the argument string has some spelling error.
Even if you don’t use Class.forName(),Many framework uses this method.
Take tomcat config-files for example,
If you write wrong class name in web.xml, Tomcat will throw ClassNotFoundException in initialize process.

To solve this exception, you must check that class name, then correct it or check if that class is in the classpath.

カテゴリー: English Post, Java タグ: , パーマリンク

1 Response to ClassNotFoundException cause and solution.

  1. ピンバック: ClassNotFoundExceptionの原因と対策 | Rutakeの技術メモ

コメントを残す

メールアドレスが公開されることはありません。

Time limit is exhausted. Please reload the CAPTCHA.