Hi,
I am new to WLST. I want to get a weblogic server state using wlstInterpreter in
java code.
I am creating a new instance of weblogic.management.scripting.utils.WLSTInterpreter and using it to print state of a given server. I am using the following code to print server state in java file
interpreter.exec("connect(" + "'" + username + "'" + "," + "'" + password + "'" + "," + "'" + ip + "'" + ")");
interpreter.exec("state(" + "'" + serverName + "'" + ", 'Server') \n");
The state is getting printed in output console but I want the state to be stored in java
string variable so that I can use the state in java code.
Please help me how to get the server state and store it in a java string variable using wlst embedded mode.