[英]How do I install Jung2 on eclipse?
http://jung.sourceforge.net/ 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.
我正在使用Mac。 And, I want to be able to use the Jung2 libraries while programming, using the Eclipse IDE.
而且,我希望能够在使用Eclipse IDE进行编程时使用Jung2库。
@Rohan: JUNG 2.0 Framework contains both binary and source form of jars. @Rohan:JUNG 2.0 Framework包含二进制和源形式的jar。
To use the binary jars from JUNG, you need to add them as Referenced Libraries
in a project. 要使用JUNG的二进制jar,需要在项目中将它们添加为
Referenced Libraries
。 Create a new project. 创建一个新项目。 Then, add required JUNG jars somewhere inside project directory.
然后,在项目目录中的某处添加所需的JUNG jar。
Refresh
project tree. Refresh
项目树。 Right-click on each JUNG jar to add it to Build Path > Add to Build Path
in Eclipse. 右键单击每个JUNG jar,将其
Build Path > Add to Build Path
Eclipse中的Build Path > Add to Build Path
。 By doing this, each will be registered under Referenced Libraries
tree in the project. 通过这样做,每个都将在项目中的
Referenced Libraries
树下注册。
Since a few JUNG jars have source code version, you can open the Build Path
of the project and go to Libraries tab
. 由于少数JUNG jar有源代码版本,您可以打开项目的
Build Path
并转到Libraries tab
。 Under this tab, it lists all JARs. 在此选项卡下,它列出了所有JAR。 Attach the JUNG source code jar version to equivalent JUNG binary jar version under
Source attachment
of that jar. 将JUNG源代码jar版本
Source attachment
到该jar的Source attachment
下的等效JUNG二进制jar版本。 For example: attach jung-samples-2.0.1-sources.jar
to jung-samples-2.0.1.jar
例如:将
jung-samples-2.0.1-sources.jar
附加到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. 完成后,转到
Referenced Libraries
下的jung-samples-2.0.1
并打开JUNG包中的任何类。 You will be able to see the source code view of the class. 您将能够看到该类的源代码视图。
One easy way is to use maven. 一种简单的方法是使用maven。 You can put jung2 as dependency libraries in your pom.xml
您可以将jung2作为依赖库放在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 . 现在有一个很好的maven插件,用于eclipse, m2e 。
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 .
您需要下载jung2 lib和库,其中jung2依赖于colt和泛型集合, 请参阅下载页面 。 Next, you need to add these libraries to your classpath, see this tutorial .
接下来,您需要将这些库添加到类路径中,请参阅本教程 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.