facebook

Output A Java Project’s Classes to WEB-INF/classes

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #351217 Reply

    eugenejsn
    Participant

    ME Blue 14 Linux

    There are two projects in my workspace.

    1. JavaProject
    default output /bin

    2.Webproject
    default output WEB-INF/classes

    Now I want all the class outputs of the JavaProject to be automatically put to the WEB-INF/classes. How can I do it?

    Thanks

    Eugene

    #351239 Reply

    eugenejsn,

    Can you please clarify if you want the .class files of the JavaProject to be put under WebProject/WEB-INF/classes folder ? If yes, you need to add Javaproject to WebProject deployment assembly and then redeploy the webproject to see all the class files under WEB-INF/classes folder. (Right click on WebProject > Select Properties > MyEclipse > Deployment Assembly > Click Add > Select Project and click Next > Select JavaProject and click Finish > Click Apply and Ok.)

    If you just want to modify JavaProject output folder, then you can modify the JavaProject output folder from JavaProject > Properties > Java Build Path > Source tab > modify the default Output folder by clicking on Browse > Click Ok.

    Hope this helps and let us know how it works for you.

    #351241 Reply

    eugenejsn
    Participant

    One thing I like to clarify before I do it:

    In my workspace, there are three projects:

    1) WebProject

    2) JavaProject

    3)WebEAR project

    I right click on WebEAR project –> MyEclipse –> Deployment Assembly –> I can see three entries already there:

    a)/EarContent DeployPath: /
    b)JavaProject Deploy Path: lib/JavaProject.jar
    c)WebProject Deploy Path: WebProject.war

    Give the above, do I still need to:

    (Right click on WebProject > Select Properties > MyEclipse > Deployment Assembly > Click Add > Select Project and click Next > Select JavaProject and click Finish > Click Apply and Ok.)

    If so, there will be two JavaProject.jar, one in WebProjectEAR, another inside the WebProject. Is this correct way to do it?

    Please verify and confirm.

    Thanks

    Eugene

    #351247 Reply

    Eugene,

    Inorder to copy all the .class files of the JavaProject into WebProject/WEB-INF/classes folder you need to add JavaProject to WebProject Deployment assembly page.

    You need to remove the JavaProject entry from EAR deployment assembly page to avoid any conflict, as the WebProject already has JavaProject entry in Deployment Assembly page.

    Hope this helps and let us know how it works for you.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Output A Java Project’s Classes to WEB-INF/classes

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