如何在Eclipse中导入一个jar ?


当前回答

只是对将jar导入Eclipse(插件开发)项目的注释:

In case you are developing Eclipse plug-ins, it makes sense to use Eclipse's native bundling mechanism instead of just importing the jar into a plug-in project. Eclipse (or better its underlying OSGi runtime, Equinox) uses so-called bundles which contain some more information than plain jars (e.g., version infos, dependencies to other bundles, exported packages; see the MANIFEST.MF file). Because of this information, OSGi bundles can be dynamically loaded/unloaded and there is automatic dependency resolution available in an OSGi/Eclipse runtime. Hence, using OSGi bundles instead of plain jars (contained inside another OSGi bundle) has some advantages.

(顺便说一句:Eclipse插件与OSGi包是一回事。)

很有可能有人已经将某个(第三方)库绑定为OSGi包。你可能想看看下面的bundle仓库:

http://www.springsource.com/repository/app/ http://download.eclipse.org/tools/orbit/downloads/ http://www.osgi.org/Repository/HomePage

其他回答

两个选择:

1/来自项目:

2/如果你已经导入了其他jar,从“References Libraries”目录:

两者都会引导你进入这个屏幕,在这里你可以管理你的库:

只是对将jar导入Eclipse(插件开发)项目的注释:

In case you are developing Eclipse plug-ins, it makes sense to use Eclipse's native bundling mechanism instead of just importing the jar into a plug-in project. Eclipse (or better its underlying OSGi runtime, Equinox) uses so-called bundles which contain some more information than plain jars (e.g., version infos, dependencies to other bundles, exported packages; see the MANIFEST.MF file). Because of this information, OSGi bundles can be dynamically loaded/unloaded and there is automatic dependency resolution available in an OSGi/Eclipse runtime. Hence, using OSGi bundles instead of plain jars (contained inside another OSGi bundle) has some advantages.

(顺便说一句:Eclipse插件与OSGi包是一回事。)

很有可能有人已经将某个(第三方)库绑定为OSGi包。你可能想看看下面的bundle仓库:

http://www.springsource.com/repository/app/ http://download.eclipse.org/tools/orbit/downloads/ http://www.osgi.org/Repository/HomePage

如果你有一个麻烦的udemy课程乍得对进口的罐子。然后按照这些步骤进行。

右键单击项目。 你会看到一个Build Path选项,点击它。 你会有一个选项配置构建路径,点击它。 去图书馆。 然后去你有一个jar文件的地方,把它们放到一个新的文件夹里,上传到一个新的地方。 然后点击Add External Jars,你肯定可以上传它,这也会对classpathxmlapplicationcontext有帮助。

谢谢你!

系统路径下的Jar文件为:

C: \ oraclexe app \ oracle产品10。2。0 \ server \ jdbc lib \ ojdbc14。jar

Ojdbc14.jar (jar文件)

要在Eclipse IDE中导入jar文件,请遵循以下步骤。

右键单击项目 选择生成路径 单击Configure Build Path 单击Libraries,选择Modulepath,然后选择Add External jar 从所需的文件夹中选择jar文件 单击“应用”和“确定”

右键单击项目。 单击Build Path。 单击“配置生成路径”。 在Libraries下面,单击Add Jar或Add External Jar。