wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 30050
    
149

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to execute wsadmin scripts(Websphere application server) from java (Standalone program)?
 
Similar Threads
How to work with wsadmin from the java program?
Problem in migration from WAS4 to WAS5.1
WsAnt task -- Please specify a different location with -tracefile option.
AppDeploymentException: []
WAS 7 Please specify a different location with -tracefile option.