How do I resolve ClassNotFoundException?

前端 未结 22 1433
后悔当初
后悔当初 2020-11-21 06:06

I am trying to run a Java application, but getting this error:

java.lang.ClassNotFoundException:

After the colon comes the location of the cla

22条回答
  •  隐瞒了意图╮
    2020-11-21 06:24

    1. It could happen if your classpath is not correct

    2. Let us posit a serializable class and deserializable class under same projectname. You run the serializable class, creating a serializable object in specific folder. Now you need the desearialized data. In the meantime, if you change the name of the project it will not work. You have to run the serializable class first and then deserialize the file.

提交回复
热议问题