Jython - How to get the path of the executed script?

WebSphere doesn't make this easy. And I've yet to find a way to do this when using Sun's JVM running WebSphere on Solaris. However, you may be able to figure out the script name using the environment when running WebSphere on Linux, Aix and possibly others OSes.

On these platforms, IBM's JVM sets the environment variable IBM_JAVA_COMMAND_LINE. You can parse it to get the '-f' argument passed to wsadmin. Sh Dave Brand has code to do this on his blog.

See fix #6 in his ibmfixes. Py script.

Thanx I looked it up and it helped a lot. For the sake of not having to follow many links that might not exist anymore in the future here is what I did. Import os print os.environement.

Get('IBM_JAVA_COMMAND_LINE') this gave me the whole JVM argument line but it also gave me the -f option passed to wsadmin. Sh which contains the path to my script. – Patrick Mar 21 at 12:21.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions