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

O

O.B.

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top