Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • You're running under Windows, yes? Is 'python' on your PATH? What happens if you type cmd /c python duplicatetestingoriginal.py into Start -> Run...? Commented Jan 25, 2012 at 16:51
  • 1
    You also might want to reconsider how you're reading stdInput/stdError. See "When Runtime.exec won't": javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html Commented Jan 25, 2012 at 16:52
  • Yes i am running in Windows, and python is in my PATH. The code runs when i type it into the cmdline or Run Commented Jan 25, 2012 at 16:52
  • Could it possibly be the case that duplicatetestingoriginal.py isn't in the current directory when you run the Java code? Maybe put in the full absolute path there? Commented Jan 25, 2012 at 16:55
  • 2
    Another thought: you catch (Exception e) and then drop it. Maybe an Exception is being thrown? Couldn't hurt to add a e.printStackTrace(); while debugging. Commented Jan 25, 2012 at 16:56