I know this question has been answered before but I tried applying those methods and it didn't work for me. I have one Project and I tried importing the Jgrapht Library in it. When I try to compile any of the files in the imported packages, I get the "Editor Does not contain a main type".
I have no idea how to fix it. In the "default.src" package of my project, I tried to include import the package such as
However, it doesn't recognize the files are there? Any suggesstions please?
If you have downloaded a library, you would not expect it to be executable, so there will be no class with a main() method.
Which IDE are you using? It looks like Eclipse to me. There is no need to instruct Eclipse to compile anything; you are probably clicking a "run" button. Find a class with a main method which you can do by going through the jgrapht.org javadoc pages; those classes with "Demo" in their name would probably do. Right-click that class in the package explorer, and then "run as" . . . "Java application".