facebook

Add external jar

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #231599 Reply

    Hello,

    I got a little issue : I have created a J2EE project and wanted to add an external jar as library with :

    Project -> Properies -> Java Build Path -> Librairies – Add Externa Jar

    I got my jar in my filesystem and added it with no problem .

    In mind , when i build my project this jar should be added automaticaly to the /webroot/WEB-INF/lib directory . In fact he did’nt and I have to import it manaually in this directory if I want my project to run !

    Do I make a mistake ? Is it a normal behaviour ?

    Thanks
    JF

    #231608 Reply

    Riyad Kalla
    Member

    JF,
    You need to navigate to your Project > Properties > MyEclipse-Web > Deployment tab and change your deployment rules to include “External JARs”

    #231612 Reply

    OK thanks a lot . 😀

    #231625 Reply

    John Brosan
    Member

    I too am having the same problem, but I did not see the “External JARS” option. When I go to

    Project->Properties->MyEclipse-Web->Deployment tab I have two group boxes

    1. Web Project Dependent Project Deployment Policy
    1a. Use Workbench Default Settings (checkbox)
    1b. Jar dependent prjoects place in the ‘lib’ directory
    1c. Use Smart Deployment…
    1d. Ignore Dependent Java…
    2. Library Deployment Policies
    2a. Use Workbench default settings.
    2b. Jars on Web project…
    2c. Jars in Web projects user libraries.
    2d. Jars exported…
    2e. User Library Jars…

    I am getting an error when trying to deploy my application. I am attempting to use JSF/MyFaces and I am getting a class not found when I attempt to deploy. I checked the lib directory of the web app and see that none of the jar files that I added are showing up there.

    I am using JBoss 4.0.2, JDK 1.5 and of course MyEclipse.

    Any help and/or clarification would be most appreciated.

    Thanks,
    John

    #231627 Reply

    I do that with Windows->Preference->MyEclipse->J2EE Project ->Web Project
    ( so for new project only )

    It’ ok when I deploy my project : libs from external jar are in the right directory on Tomcat side
    BUT not in my eclipse project .

    When I try modify my project with Project > Properties > MyEclipse-Web > Deployment, I can’t do it. All is grey . I do not have access to the button.

    We need more help .

    Thanks

    #231628 Reply

    John Brosan
    Member

    Atmel,

    I think I just figured it out. In order to get the jar files into the WEB-INF/lib directory. I went to Project -> Properties -> MyEclipse-Web -> Deployment. Uncheck the “Use Workbench Default Settings” checkbox and check the checkbox that reads, “Jars on Web project build path”. Save, and redeploy your app.

    That worked for me. I’ll do my best to help.

    Thanks,
    John

    #231639 Reply

    Riyad Kalla
    Member

    atmel,
    You need to click the “override workbench settings” checkbox first as John mentioned.

    #231657 Reply

    Yes I did it but it still doesnt work for my project lib directory ( it’s OK for the Tomcat webapps lib dir ).

    #231665 Reply

    Scott Anderson
    Participant

    atmel,

    It’ ok when I deploy my project : libs from external jar are in the right directory on Tomcat side
    BUT not in my eclipse project .

    The deployment setting only affects the deployment of your project to the server. It doesn’t rearrange the libraries in your project because it’s assumed you wanted the jar to remain external for a reason. If you’d *like* it to exist under your WEB-INF/lib directory, then simply copy it in there rather than referencing it as an external jar. The deployment settings are to enable you to deploy properly *without* rearranging your library structure.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Add external jar

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