Reputation: 45
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)
While am running the same code in my Eclipse IDE its working fine!
Please let me know, how to solve this. Thanks!
Upvotes: 1
Views: 940
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