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 execute wsadmin scripts(Websphere application server) from java (Standalone program)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "How to execute wsadmin scripts(Websphere application server) from java (Standalone program)?" Watch "How to execute wsadmin scripts(Websphere application server) from java (Standalone program)?" New topic
Author

How to execute wsadmin scripts(Websphere application server) from java (Standalone program)?

Ouney Gags
Greenhorn

Joined: Jan 23, 2011
Posts: 8
Hi Folks, Need your help.

We can embed WLST scripts inside a java class and execute through WLSTInterpreter(Python Interpreter with Weblogic extensions). Can we do the same for wsadmin scripts (from standalone java program)?

I understand that we can use jmx but i think that works from a servlet but i need to execute wsadmin script ( create server/profiles etc.) from a standalone java program. Can we directly embed wsadmin (jython) script in java and execute them with PythonInterpreter? Waiting for the responses.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

If you call wsadmin.sh with the -f parameter, you can pass in a script rather than using interactive mode. This means you can use Runtime.exec() from Java to run the command.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
Don't get me started about those stupid light bulbs.
 
subject: How to execute wsadmin scripts(Websphere application server) from java (Standalone program)?
 
Similar Threads
Problem in migration from WAS4 to WAS5.1
How to work with wsadmin from the java program?
WAS 7 Please specify a different location with -tracefile option.
AppDeploymentException: []
WsAnt task -- Please specify a different location with -tracefile option.