This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30586
    
154

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
 
GeeCON Prague 2014
 
subject: How to execute wsadmin scripts(Websphere application server) from java (Standalone program)?