Manish Kumar Sahu
Manish Kumar Sahu

Reputation: 45

java.lang.NoClassDefFoundError |

My java program is running fine on my Eclipse IDE, but when am trying to run the same ".java" file using my command prompt it is showing me an error as shown in the fig.

Error: Could not find or load main class EulerianPathDirectedEdgesAdjacencyList Caused by: java.lang.NoClassDefFoundError: com/euler/EulerianPathDirectedEdgesAdjacencyList (wrong name: EulerianPathDirectedEdgesAdjacencyList)

enter image description here

While am running the same code in my Eclipse IDE its working fine!

enter image description here

Please let me know, how to solve this. Thanks!

Upvotes: 1

Views: 940

Answers (1)

pm.
pm.

Reputation: 53

Try running the command : java com.euler.EulerianPathDirectedEdgesAdjacencyList from the same directory where class file got created after running the previous javac command

Upvotes: 1

Related Questions