Results 1 to 5 of 5
  1. #1
    herders is offline Member
    Join Date
    Jan 2014
    Posts
    3
    Rep Power
    0

    Default Include .ear file in classpath

    Hello All,

    I am writing an Ant script using the javac command but the library I need is bundled in an ear file, how can I reference this jar in ear file without extracting the ear file.

    Thanks
    Jack

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    760
    Rep Power
    8

    Default Re: Include .ear file in classpath

    I think you should have the jar file extracted first before you can use it for compilation.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,996
    Rep Power
    5

    Default Re: Include .ear file in classpath

    Correct. An EAR is a packaged application, it is not something you can or should reference in another application. Its a simple case of needing the same library in two different applications apparently, so manage them separately as part of those two applications. To make that easier consider using Ivy.

    Home | Apache Ivy ™
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    herders is offline Member
    Join Date
    Jan 2014
    Posts
    3
    Rep Power
    0

    Default Re: Include .ear file in classpath

    Thanks for the replies. I eventually went that route.

    Unfortunately we are using very old software and are limited to the tools that are available with that build, essentially ant.1.6.5 and weblogic 10.3.0. The ear file is a core library used by the server.

    Thanks


    Jack

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,996
    Rep Power
    5

    Default Re: Include .ear file in classpath

    An ear file is NOT a library, it is an entire application. As long as you keep confusing yourself by applying wrong terminology you'll keep making wrong assumptions.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. how to include restart merkers in a JPEG file
    By ananta_javaforums001 in forum Networking
    Replies: 0
    Last Post: 04-09-2009, 03:29 PM
  2. How to include lib in JAR file
    By adam.muller in forum Eclipse
    Replies: 4
    Last Post: 08-06-2008, 05:15 PM
  3. Include file from other proyect
    By oleg_gunnar in forum Advanced Java
    Replies: 1
    Last Post: 03-08-2008, 06:20 PM
  4. Include Java file in HTML Page
    By kathyc in forum New To Java
    Replies: 2
    Last Post: 03-07-2008, 03:51 AM
  5. jsp:include and include file
    By Heather in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-14-2007, 04:19 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
  •