Executing a static non-main operation in a jar file contained withina war file

Discussion in 'Java' started by O.B., Jun 24, 2006.

  1. O.B.

    O.B. Guest

    I have a war file that contains a bunch a jar files. Within one of the
    jar files, there is a static non-main operation within a class that
    returns a String. I want to execute the static operation from within
    another completely stand-alone java application. Is this possible?

    Example:

    testing.war contains a file named website.jar. Within this jar file, I
    have a class (com.dafunks.testing.Version) with a static operation
    (getVersion) that returns a String. Is there a way to execute the
    getVersion() operation from another Java application?

    So far, I've figured out that I can use
    java.util.jar.JarInputStream.JarInputStream to convert the testing.war
    into an InputSteam. I can use java.util.jar.JarEntry to index to the
    website.jar file. But I'm no sure how to execute a static non-main
    operation within this jar (if that is even possible).

    Help?
    O.B., Jun 24, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Alan Farrell
    Replies:
    6
    Views:
    9,690
    Andrew Thompson
    Jan 9, 2004
  2. hiwa
    Replies:
    1
    Views:
    1,571
    James Alan Farrell
    Jan 13, 2004
  3. cyril
    Replies:
    2
    Views:
    3,857
    cyril
    Aug 25, 2004
  4. Grzesiek
    Replies:
    5
    Views:
    12,874
  5. Yunbo
    Replies:
    1
    Views:
    869
    Arne Vajhøj
    Mar 17, 2011
Loading...

Share This Page