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:
- Android appears java.lang.NoClassDefFoundError A solution to the error
- Spring nested exception is java.lang.NoClassDefFoundError: org/springframework/core/MethodClassKey
- How to Fix:java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/methods/HttpPost
- java.lang.NoClassDefFoundError: org/junit/platform/launcher/TestExecutionListener
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- java.lang.IllegalStateException Exception: cause analysis and solution
- Java:java.lang.OutOfMemoryError : GC overhead limit exceeded solution
- java.lang.NoSuchMethodError: org.json.JSONObject.put(Java/lang/String; Java/util/Collection;) “209151;”
- Maven package error reporting java.lang.stackoverflowerror solution
- Error reporting: java.lang.nullpointerexception solution
- Solution in idea java.lang.ClassNotFoundException : org.springframework.web . context.ContextLoaderListener
- java.lang.IllegalArgumentException : could not get next sequenced ID for sequence name: Visitor solution
- Mybatis error,There is no getter for property named ‘xx’ in ‘class java.lang.String The solution
- Tomcat memory overflow in Eclipse: Java. Lang. outofmemoryerror: permgen space solution:
- IBM MQ Reason 2538(MQRC_ HOST_ NOT_ An example of error reason
- build.gradle Warming: cannot be applied to ‘(groovy.lang.Closure)’/'(java.lang.String)’
- The reason and solution of Android intent value not updated
- [Solved] Sqoop Mysqltohive error: Error: java.lang.RuntimeException: java.lang.RuntimeException…
- The processing method after deleting idea’s. IML file by mistake
- The reason and solution of the error of join function: sequence item 0: expected STR instance, int found