Eclipse中的Classpath jar文件 [英] Classpath jar files in eclipse

查看:106
本文介绍了Eclipse中的Classpath jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是eclipse的新手,我对引用外部Jar文件有一个一般性的疑问.

我去了 buildpath->配置构建路径,并添加了两个我想引用的jar文件作为外部库的一部分,但是我似乎可以在其中创建类的实例对象那个罐子.

我也尝试仅将jar文件复制并粘贴到标准库的扩展文件夹中,但这也不起作用.

如何使用这些jar文件中包含的类的实例对象?

解决方案

即使您建立到外部JAR的路径,也必须import所需的类,因为它们实际上并不存在于您正在使用的同一个程序包中. /p>

I am new to eclipse and I have a general question about referencing external Jar files.

I went to the buildpath -> configure build path and added my two jar files that I wanted to reference as parts of an external library but I can seem to make an instance object of the classes in that jar.

And also I tried just copy and pasting the jar files to the extension folder of the standard library too but this also doesn't work.

How can I use the instance objects of the classes included in these jar files?

解决方案

Even if you build path to external JARs you have to import the required classes because they do not actually exist inside the same package you are working at.

这篇关于Eclipse中的Classpath jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆