简体   繁体   中英

How to use the Jdom package?

I want to use the Jdom package to use .XML files for my application. I have downloaded the Jdom's build 2.0.6.

But now, I don't know how to install it. If someone can guide me..

(I'm on macOs)

If you downloaded JDOM jar file, then simply include it to your java project in IDE. If you use IntelliJ IDEA, then follow these steps:

  1. File > Project Structure > Libraries > New Project Library > Java
  2. Find your jar file
  3. Add it to your project

If you use Maven, then you can add this code to your pom.xml :

<dependency>
    <groupId>org.jdom</groupId>
    <artifactId>jdom</artifactId>
    <version>2.0.2</version>
</dependency>

You can view all available versions on Maven Central .

If you use Eclipse IDE, then follow these steps :

  1. Right click on your project > Build Path > Configure Build Path > Add external JARs
  2. Select your JAR
  3. Apply and save

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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