I am trying to open a java link I have saved on my folder on my desktop. I can't get it to find the file. The java address is x:\green\Adam\FILEJAR.jar. This is an executable JAR file I want to open it and have it on my desktop, just open it and have it run as normal for the Java link. Want Python just to open it.
import subprocess
run="x:\green\Adam\FILEJAR.jar"
proc=subprocess.Popen(run)
I get this....
Traceback (most recent call last):
File "C:/Python32/test3", line 3, in <module>
proc=subprocess.Popen(run)
File "C:\Python32\lib\subprocess.py", line 741, in __init__
restore_signals, start_new_session)
File "C:\Python32\lib\subprocess.py", line 960, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
What am I doing wrong, why can't it find the file?
r
to preserve the forward slashes:run=r"x:\green\Adam\FILEJAR.jar"