facebook

[Closed] MyEclipse — Adding Jar files to project

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #258582 Reply

    Mork
    Participant

    My web hosting situation requires that all web apps share the same WEB-INF and WEB-INF/lib folders for each domain.

    Since I just ran into a problem where I had a conflict due to all the JARs in the lib folder, I tried to JAR up all the JAR files for a particular Web app like this:

    jar -cvf mylib.jar *.*

    Then, I stopped tomcat, copied for safekeeping, all the lib files out of WEB-INF\lib to C:\TEMP.

    Then, I added via MyEclipse’s “Add External Jars” the mylib.jar.

    (The only file in WEB-INF/lib is now mylib.jar)

    Then I restarted Tomcat.

    This didn’t work. When I ran the application, it crashed.

    Do I need to do something more specific to have this “mylib.jar” be part of the Classpath?

    Thanks in advance.

    — M

    #258625

    Scott Anderson
    Participant

    Mork,

    I think I can help out. From what you did it looks like your mylib.jar file will contain other jar files, which is not permitted by the JVM and classloaders. What you need to do to combine jars is unjar them all to the same directory, then rejar the actual files (not the jars) into mylib.jar.

    #258631

    Mork
    Participant

    Hi Scott,

    Interesting. That explains it.

    The problem remains though with a single lib folder, I could get some incompatible jar files among various web apps. This is a fault of the way my Web hosting provider has “webapps” configured per domain….not that great.

    Thanks very much for your reply!!!

    — M

    #259603

    Riyad Kalla
    Member

    Glad it’s working.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] MyEclipse — Adding Jar files to project

You must be logged in to post in the forum log in