I am a java developer and I am new to Jython.
I want to set the environment variable (ClassPath) using jython script. I
tried searching for this around in Web, but tough luck.
Can any one give me a hint on how to do this? Any kind of suggestion is
Thanks in Advance
View this message in context: http://www.nabble.com/Set-Environment-variable-in-Jython-Script-tp15885383p15885383.html
Sent from the jython-dev mailing list archive at Nabble.com.
From: Charlie Groves <charlie.groves@gm...> - 2008-03-09 20:52:23
On Thu, Mar 6, 2008 at 4:04 PM, kkroth <kirthi97@...> wrote:>
> I want to set the environment variable (ClassPath) using jython script. I
> tried searching for this around in Web, but tough luck.
> Can any one give me a hint on how to do this? Any kind of suggestion is
will do it for any processes you open with Python's process opening
mechanisms: os.system, popen and so on. If you're trying to change
the environment for another place where Java is using Runtime.exec, I
don't think there's any way to customize its environment short of
passing it in as envp to exec. Keep in mind that the classpath is
read by the JVM at startup, so changing it at runtime wouldn't affect
the classes available to the current JVM, and that any environment
changes from within Jython won't remain after the process ends.
Also, this mailing list is jython-dev, which is for the discussion of
developing the Jython language itself. To ask questions about using
Jython, you should go to jython-user in the future.
Get latest updates about Open Source Projects, Conferences and News.