简体   繁体   English

如何在Eclipse上安装Apache River

[英]How to install apache river on eclipse

I have a class where we have to use apache river for our work and assignment and I'm trying to install it at home. 我有一堂课,我们必须使用apache river进行工作和分配作业,我正在尝试在家中安装它。

I'm fairly new to apache-river and I have installed plug-ins for eclipse before, but this seems a bit more tricky or maybe I'm doing it wrong. 我对apache-river相当陌生,并且之前已经安装了eclipse插件,但这似乎有点棘手,或者我做错了。

I've looked at https://river.apache.org/ and I've downloaded the zip file and extracted it but I'm not sure what to do with it after that. 我查看了https://river.apache.org/,并下载了zip文件并解压缩了该文件,但是在此之后我不确定该如何处理。 I'm not even sure that, that is the right download I need. 我什至不确定,那是我需要的正确下载。

Any help would be appreciated, thanks. 任何帮助,将不胜感激,谢谢。

Please correct me if I misunderstood your question. 如果我误解了您的问题,请指正。 I believe you want to import whatever it is Apache River has to offer in Eclipse such that you can use classes in Apache River in your project. 我相信您想导入Eclipse中Apache River必须提供的任何内容,以便您可以在项目中使用Apache River中的类。 Correct? 正确?

If yes, this is what i did - 如果是,这就是我所做的-

  1. Downloaded apache-river2.2.2.bin.zip from the site you mentioned, extracted it. 从您提到的站点下载apache-river2.2.2.bin.zip,并将其解压缩。
  2. Created new Java Project in Eclipse with a trial class. 使用试用版在Eclipse中创建了新的Java项目。
  3. Configured build path of this Eclipse project, and added all the jars from the /lib folder as 'External Jars'. 配置此Eclipse项目的构建路径,并将/ lib文件夹中的所有jar添加为“外部jar”。 All these jars showed up in the Referenced Libraries section in my project in Eclipse. 所有这些jar都显示在我在Eclipse中的项目的“引用的库”部分中。
  4. I tried a sample line of code to see if I get classes from Apache river. 我尝试了一段代码示例,看看是否从Apache river获得了类。 for eg - 例如-

      LookupLocator locator = new LookupLocator(arg0); 

    And it worked - Eclipse added 并且有效-Eclipse添加了

      import net.jini.core.discovery.LookupLocator; 

    automatically. 自动。

  5. I checked and this class comes from the jini-core.jar 我检查了这个课,它来自jini-core.jar

Of course, if you are using other build / dependency management tools like maven/ant, this eclipse process will differ a little bit. 当然,如果您正在使用其他构建/依赖项管理工具(例如maven / ant),则这次蚀过程将有所不同。 Let me know if this worked for you. 让我知道这是否对您有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM