Problems to import the Jgrapht library into a netbeans project

0

good morning, I consult here if someone else has had this problem and has found a solution, I downloaded from the official website of jgrapht link the zip file they have, for windows, then I try to import into my netbeans the library by right clicking in the library and then "add file JAR / folder" adds the file without problems with a lot of packages.

The problem is that then, no matter how much I recompile, it is as if nothing had been imported, that is, when writing the example code link

does not recognize me or let me import "import org.jgrapht. ;     import org.jgrapht.alg. ;     import org.jgrapht.graph. *; "

I have tried to do it by hand, but the problem is that if I import the core for example, some things like the DijkstraShortestPath.findPathBetween does not work correctly as it appears in the official jgrapht documentation if not as a version old and the truth and I do not know what else to do, if anyone knows what I can do to be imported correctly I would appreciate it very much.

    
asked by David Pinedo Solano 18.12.2017 в 23:08
source

1 answer

0

What I did to see if it is a general IDE problem was to create my project and import all the jar.

You right click on the Libraries folder:

Later I selected all the .jar and that's it. The .jars are in the folder after compressing the .zip. What I did was go to the project folder and create a folder called libs, there I left all the .jars and from there I am adding the references to the project.

To finish the project is something like this:

To test a class I did import Graph and it imports well.

I hope it helps. Greetings!

    
answered by 19.12.2017 / 17:59
source