1
votes

I am using IBM WebSphere server for my application. I am administrating it through command line using Java and Jython. I have written Jython script to get server configuration but how can I execute this script from Java swing application i.e. send parameters and get Jython script result in return.

After some searching like this I think I need to install Python. Can I do this without installing Python.

1

1 Answers

1
votes

Two alternatives;

1-) Create a custom Java administrative client program using WebSphere Application Server administrative Java APIs. The Java API and wsadmin scripts manipulate the same administrative service MBeans, so they are identical except syntax. You may convert your Jython scripts to Java routines and use them directly.

2-) Since you already developed scripts, this may be more tempting; you may use Runtime.exec to spawn and execute wsadmin scripts as external processes from within your Swing application.