From: Stuart S. <st...@me...> - 2001-05-01 07:00:04
|
Hi Brian, I uncommented the source (org/python/util/jython.java) and recompiled under JDK 1.3, and the properties now get propagated (it works) using the tweaked jython.jar . Been a long time since I've been under the hood in a compiler/interpreter (gcc for HPUX-6.5 back in... um, a while ago...;-) Thank you for both pointing out where the problem was, and reminding me that I can actually do something about it... Stuart brian zimmer wrote: > Stuart, > > Looking at the sourcecode, here's why it doesn't work (this method eventually gets called for -D's): > > public void setProperty(String key, String value) { > properties.put(key, value); > // This only works for Java 1.2. There appears to be no portable > // way to support this under Java 1.1 > // try { > // System.setProperty(key, value); > // } > // catch (SecurityException e) {} > } > > Notice it does not set the System property because of the noted comment. You could optionally change the batch/shell script you use to invoke the jython interpreter to pass the -D arguments to the JVM as opposed to the PVM (the way you are doing it) and then the properties will be available to you. Hope this helps... > > brian > > At 11:22 AM 4/30/2001 -0700, Stuart Swerdloff wrote: > >Hi Folks, > > > > I have a problem with System Properties not being passed in from > >the jython command line in to the jvm (Sun JDK1.3, Win2000) > >The Jython command line allows one to set properties for Python to find, > >but this > >does not > >seem to propagate into the JVM. ... . . . |