How do I install Jung2 on eclipse?

ε祈祈猫儿з 提交于 2019-12-29 01:42:20

问题


http://jung.sourceforge.net/

Can someone walk through the steps carefully for me? I have been trying for hours and I can't seem to get it. I'm using a Mac. And, I want to be able to use the Jung2 libraries while programming, using the Eclipse IDE.


回答1:


@Rohan: JUNG 2.0 Framework contains both binary and source form of jars.

To use the binary jars from JUNG, you need to add them as Referenced Libraries in a project. Create a new project. Then, add required JUNG jars somewhere inside project directory. Refresh project tree. Right-click on each JUNG jar to add it to Build Path > Add to Build Path in Eclipse. By doing this, each will be registered under Referenced Libraries tree in the project.

Since a few JUNG jars have source code version, you can open the Build Path of the project and go to Libraries tab. Under this tab, it lists all JARs. Attach the JUNG source code jar version to equivalent JUNG binary jar version under Source attachment of that jar. For example: attach jung-samples-2.0.1-sources.jar to jung-samples-2.0.1.jar

Once done, go to jung-samples-2.0.1 under Referenced Libraries and open any class in a JUNG package. You will be able to see the source code view of the class.




回答2:


One easy way is to use maven. You can put jung2 as dependency libraries in your pom.xml

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung2</artifactId>
        <version>2.0.1</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-graph-impl</artifactId>
        <version>2.0.1</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

Now there is a nice maven plugin for eclipse, m2e.




回答3:


I do not what do you mean by installing? You need to download jung2 lib and libraries, which jung2 depends on colt and generic collections see download page. Next, you need to add these libraries to your classpath, see this tutorial.



来源:https://stackoverflow.com/questions/5616233/how-do-i-install-jung2-on-eclipse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!