File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes How to call a stand alone class from WAS??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "How to call a stand alone class from WAS???" Watch "How to call a stand alone class from WAS???" New topic
Author

How to call a stand alone class from WAS???

Gaurav Jain
Ranch Hand

Joined: Mar 11, 2004
Posts: 108
I have a standalone class sitting outside WAS.
Is there any way (WAS API) i can start that stand alone class from WAS...that is as soon as my WAS starts that class also starts.
I dont use start that class using the servlet.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
I have no idea what you mean by a "standalone class". Do you mean a class that has a main() method you need to start?
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Gaurav Jain
Ranch Hand

Joined: Mar 11, 2004
Posts: 108
yes.
A class with a main method.
Scott Duncan
Ranch Hand

Joined: Nov 01, 2002
Posts: 363
Kick off a thread in a servlet's init method that uses the RunTime object. Bad thing is that the thread will kick off when the app is restarted.


No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
Gaurav Jain
Ranch Hand

Joined: Mar 11, 2004
Posts: 108
I dont want to use the servlet method.
The update is that i created a java class outside WAS and packaged it in a jar file.
Mentioned the path of the jar file in java VM arguments of WAS.
When i start the server that standalone java class gets executed but then the server stops automatically without giving any error.
What is the problem??
venki janapati
Greenhorn

Joined: Dec 26, 2002
Posts: 19
use websphere startup class. if you mention the class with required arguments in the configuration,when the server starts up ,it starts the stand alone program as well
 
wood burning stoves
 
subject: How to call a stand alone class from WAS???