Java 如何在 Eclipse 中添加引用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3167353/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 17:02:59  来源:igfitidea点击:

How to add a reference in Eclipse

javaeclipse

提问by masfenix

I have developed a little software in ACCESS/VBA. It dealt with Lotus Notes so in Visual Basic editor I just went to tools -> references and checked the Lotus Notes Automation classeswhich allowed me to work with it.

我在 ACCESS/VBA 中开发了一个小软件。它处理 Lotus Notes,所以在 Visual Basic 编辑器中,我只是转到工具 -> 引用并检查允许我使用它的Lotus Notes 自动化类

Now I wanna port this to Java. Last time i used java was about 4 years ago. I got my company to install Eclipse on my computer. I dont think i'll have trouble programming it because I come from a .net (C#) background.

现在我想把它移植到Java。我上次使用 java 是在大约 4 年前。我让我的公司在我的电脑上安装 Eclipse。我不认为我会遇到编程问题,因为我来自 .net (C#) 背景。

HOWEVER, I can't seem to find a way to reference the LotusNotes classes through Eclipse. The class is a "tlb" file in the program files directory.

但是,我似乎找不到通过 Eclipse 引用 LotusNotes 类的方法。该类是程序文件目录中的“tlb”文件。

采纳答案by ring bearer

  1. Right click on your project and select Propertiesto open the Properties dialog.
  2. Click on Java Build Pathon the left navigation tree.
  3. Select the Librariestab on the right.
  4. Add your Jars to the list.

    Note:You can also add link to a class folder by clicking the Add Class Folderbutton on right.

  1. 右键单击您的项目并选择“属性”以打开“属性”对话框。
  2. 单击左侧导航树上的Java Build Path
  3. 选择右侧的选项卡。
  4. 将您的罐子添加到列表中。

    注意:您还可以通过单击右侧的添加类文件夹按钮来添加指向类文件夹的链接。

Screenshot of the Properties Screen

属性屏幕的屏幕截图