0

I am writing a first VERY simple class to see if my install can build something. So this is what I have

import org.jgrapht.ListenableGraph;
import org.jgrapht.ext.JGraphModelAdapter;
import org.jgrapht.graph.DefaultEdge;
import org.jgrapht.graph.ListenableDirectedGraph;

public class Some<JGraph> {

private Some() {
        ListenableGraph g = new ListenableDirectedGraph( DefaultEdge.class );

        JGraph graph = new JGraph(new JGraphModelAdapter( g ));
    }
}

I am working in Eclipse and I have jgrapgt-core, jgrapht-ext, jgraphx and jgraphx-3.2.2.0 setup as user libraries.

My problem is when I try to create the JGraphModelAdapter I get the error:

The type org.jgraph.graph.AttributeMap cannot be resolved. It is indirectly referenced from required .class files

Any help would be great.

jiveturkey
  • 2,484
  • 1
  • 23
  • 41

1 Answers1

0

JGraphT uses the old JGraph 5 library for visualization. org.jgraph is JGraph 5, com.jgraph is JGraphX.

Replace the jgraphx libraries with those from JGraph 5. JGraph 5 is on Github here.

Frodo Baggins
  • 8,290
  • 6
  • 45
  • 55
  • I wasn't sure if that was the case simply because I do not see any algorithms implemented in JGraphX. It looks simply like a visualization library. I was hoping for 'shortest path', 'sorting', that sort of thing. – jiveturkey Mar 17 '15 at 21:07