appear java.lang.NoClassDefFoundError A kind of reason and solution of the mistake

Today, when running a java program, I met java.lang.NoClassDefFoundError My mistake. At first glance, it’s the classpath setting. It turns out that the solution is also very simple. There are two ways:

When running, with the – CP parameter, the value is “‘”, which indicates the current directory. For example:

java -cp . VolcanoRobot

Write classpath =. \;% Java in the environment variable_ HOME%\lib\ tools.jar Again, pay attention to the one in front. You can:

java VolcanoRobot

In comparison, the latter method is more thorough.

Read More: