Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Rep Power

    Default Adding external library to Java Spring MVC

    I'm trying to add an external library to a Java Spring MVC project. The library is PyramidIO. The download is at GitHub, but it looks like it only contains the source and I have no idea how to get the thing to compile correctly.

    The GitHub page has an explanation for adding the library as a Maven dependency with a repository. I'm using Gradle, so I added the dependency like this:

    Java Code:
    dependencies {
    	compile ('org.webjars:jquery:2.1.4')
    But I'm not sure how to actually import the library into my project. I've tried a few different statements. Here's what I have now:

    import gov.nist.isg.*;

    I thought about adding the .jar file for PyramidIO to the "Reference Libraries" that I can see with Eclipse, but like I said, I can't figure out how to compile the thing, or find one already compiled.

    So how do I get this external library into my project????

    Thanks for any advice.

  2. #2
    eedanna is offline Member
    Join Date
    Feb 2009
    Rep Power

    Default Re: Adding external library to Java Spring MVC

    After added the dependency, try to ran the command (for maven-> mvn clean install) to get it download in to your local repository .

    Once the jar downloaded successfully, go to your local repository (for maven .m2-repository) and verify the jar.

    Just execute the below steps
    - Go to the eclipse
    - Right click on project - preferences,
    - Go to Build path -- Libraries tab -- see the jar already added
    - Go to Order and Import tab , click select all (so that the newly added jar will be included)
    - Then go to Deployment Assembly tab and Click on Add button and Select all M2_REPO jar and Click

    Now you are all set to access the new jar file in to your code. Try this.

    Thank you.

Similar Threads

  1. Problem with adding external library (openCv)
    By giersz2 in forum New To Java
    Replies: 1
    Last Post: 10-14-2012, 05:09 PM
  2. JNI : How to resolve dll external library dependency
    By vinaykutsa in forum Advanced Java
    Replies: 0
    Last Post: 06-02-2011, 06:12 AM
  3. external library problem
    By jperson in forum Eclipse
    Replies: 2
    Last Post: 05-17-2011, 10:25 AM
  4. External Jar Library
    By a13w in forum New To Java
    Replies: 5
    Last Post: 09-24-2009, 05:23 PM
  5. external library help
    By SIAS87 in forum Java Applets
    Replies: 0
    Last Post: 03-28-2009, 04:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts