This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Calling a JAVA Class in a Deployed Web Application from shell script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Calling a JAVA Class in a Deployed Web Application from shell script" Watch "Calling a JAVA Class in a Deployed Web Application from shell script" New topic
Author

Calling a JAVA Class in a Deployed Web Application from shell script

murthy bala
Greenhorn

Joined: Dec 20, 2005
Posts: 9
All,

I need to call a class packaged in my web application from a shell script to pass an argument to the class. To be more specific, the packaged web archive (WAR) will be deployed in an application server and after its deployed i need to call that particular class present in the WAR file on a continuous basis and pass an argument.

Example: Target class file's directory location in the WAR file - WEB-INF/Classes/com/sample/batch/invokeBatch.java

and i need to call this java file from a shell script from my unix home directory and pass it an argument like

./calljob.sh $java_argument

Can anyone suggest how to proceed further on this. Where can i start from to work on the solution?


Bala
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If it's deployed locally, this is easy--just use the appropriate classpath.

If it's not, then it's not: send an HTTP request instead--much, much easier.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41124
    
  45
This was also asked and answered in this duplicate topic. Please do not post the same question to multiple forums: CarefullyChooseOneForum


Ping & DNS - my free Android networking tools app
murthy bala
Greenhorn

Joined: Dec 20, 2005
Posts: 9
Thanks David and Ulf. i will work on your suggestion.

Ulf, I Will make sure that topics are not posted in multiple forums going forward.
murthy bala
Greenhorn

Joined: Dec 20, 2005
Posts: 9
Thanks Ulf, Your solution Worked Perfectly.
 
 
subject: Calling a JAVA Class in a Deployed Web Application from shell script
 
Similar Threads
Problem accessing classes from /WEB-INF/classes directory
JSP Compilation doubt
help me with specify properties file please
Reading class files from a war
Calling a Java Class in a WebArchive from an external shell script