Add package to project Classpath in Eclipse Environment

Source: Internet
Author: User

ABSTRACT:

In the Eclipse environment,Import is searching for package(. class file) in the CLASSPATH path and the project directory,

If you wantan IM port third-party package , you need to Add the package's top-level path to CLASSPATH. However,

The CLASSPATH set by the system environment variable cannot be recognized by the Eclipse and will be reported unresolve errorbecause

The CLASSPATH of the project is rewritten by E Clipse and needs to be set by the GUI or the . CLASSPATH file.

1. File Preparation

. class file (. Jar also available)

Note: cannot be a . Java file

2. set the classpath variable for the project

Two methods:

    1. Through the GUI:

project->properties->JAva Build path->libraries->add External Class Folder

    1. Modify the . classpath file under the project file

Add classpathentry, kind set to "Lib",path set to the top-level path of p Ackage:

<classpathentry kind= "Lib" path= "C:/users/rogeret/workspace/tij4-class"/>

Add package to project Classpath in Eclipse Environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.