Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ouney Gags
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic