Message1501

Author garethdoutch
Recipients
Date 2007-02-20.15:51:33
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
os.system, when calling an application with a space in the path name, causes java.lang.IllegalArgumentException to be thrown.

An example of the command (which works in CPython):

os.system('"C:/Program Files/Mozilla Firefox/firefox.exe" www.jython.org')

I am running Jython 2.2a1 on java1.6.0 and WinXP. The following is a copy of my Exception Trace:

>>> os.system('"C:/Program Files/Mozilla Firefox/firefox.exe" www.jython.org')
Traceback (innermost last):
  File "<console>", line 1, in ?
  File "C:\jython\Lib\javaos.py", line 228, in system
  File "C:\jython\Lib\popen2.py", line 232, in system
  File "C:\jython\Lib\popen2.py", line 69, in __init__
  File "C:\jython\Lib\javashell.py", line 61, in execute java.lang.IllegalArgumentException
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        at java.lang.ProcessBuilder.start(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:174)
        at org.python.core.PyMethod.__call__(PyMethod.java:93)
        at org.python.core.PyObject.__call__(PyObject.java:607)
        at javashell$py.execute$4(C:\jython\Lib\javashell.py:61)
        at javashell$py.call_function(C:\jython\Lib\javashell.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:213)
        at org.python.core.PyTableCode.call(PyTableCode.java:426)
        at org.python.core.PyTableCode.call(PyTableCode.java:322)
        at org.python.core.PyFunction.__call__(PyFunction.java:193)
        at org.python.core.PyMethod.__call__(PyMethod.java:93)
        at org.python.core.PyObject.__call__(PyObject.java:594)
        at popen2$py.__init__$7(C:\jython\Lib\popen2.py:69)
        at popen2$py.call_function(C:\jython\Lib\popen2.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:213)
        at org.python.core.PyTableCode.call(PyTableCode.java:426)
        at org.python.core.PyTableCode.call(PyTableCode.java:322)
        at org.python.core.PyFunction.__call__(PyFunction.java:193)
        at org.python.core.PyInstance.__init__(PyInstance.java:174)
        at org.python.core.PyClass.__call__(PyClass.java:293)
        at org.python.core.PyObject.__call__(PyObject.java:621)
        at popen2$py.system$21(C:\jython\Lib\popen2.py:232)
        at popen2$py.call_function(C:\jython\Lib\popen2.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:213)
        at org.python.core.PyTableCode.call(PyTableCode.java:426)
        at org.python.core.PyFunction.__call__(PyFunction.java:187)
        at org.python.core.PyObject._callextra(PyObject.java:725)
        at javaos$py.system$40(C:\jython\Lib\javaos.py:228)
        at javaos$py.call_function(C:\jython\Lib\javaos.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:213)
        at org.python.core.PyTableCode.call(PyTableCode.java:426)
        at org.python.core.PyFunction.__call__(PyFunction.java:187)
        at org.python.core.PyMethod.__call__(PyMethod.java:120)
        at org.python.core.PyObject.__call__(PyObject.java:594)
        at org.python.pycode._pyx43.f$0(<console>:1)
        at org.python.pycode._pyx43.call_function(<console>)
        at org.python.core.PyTableCode.call(PyTableCode.java:213)
        at org.python.core.PyCode.call(PyCode.java:14)
        at org.python.core.Py.runCode(Py.java:1182)
        at org.python.core.Py.exec(Py.java:1204)
        at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:148)
        at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:88)
        at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:69)
        at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:44)
        at org.python.util.InteractiveConsole.push(InteractiveConsole.java:83)
        at org.python.util.InteractiveConsole.interact(InteractiveConsole.java:62)
        at org.python.util.jython.main(jython.java:214)

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException 
History
Date User Action Args
2008-02-20 17:17:45adminlinkissue1664437 messages
2008-02-20 17:17:45admincreate