Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Executing a static non-main operation in a jar file contained withina war file

Reply
Thread Tools

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

 
 
O.B.
Guest
Posts: n/a
 
      06-24-2006
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open data file contained in jar with JFileChooser news.rcn.com Java 4 04-20-2007 12:02 AM
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM



Advertisments