I'm trying to run a python script during the execution of my java code, because it will depend on the output received from the python script. So far I've tried using jythonc, unfortunately to no success, and now im trying to use the java Runtime and java Process to execute the python script.
Now I've run into a problem when trying to call the python script. I feel as though it doesn't even call the script because it takes less than a couple seconds to get to the next page....
Could the problem be how I am calling the python script?? I am trying to run this through a web application...
Here is some of my code:
    String run = "cmd /c python duplicatetestingoriginal.py" ;
    boolean isCreated = fwr.writeFile(BugFile, GD, 500, true, 5, "LET");
    if(isCreated){
        try{
            r = Runtime.getRuntime();
            p = r.exec(run);
            BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
    BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));
    String line = "";
    while ((line = stdInput.readLine()) != null) {
                System.out.println(line);
    }
    while ((line = stdError.readLine()) != null) {
               errorW.write(line);
    }
            int exitVal = p.waitFor();
            arrayList = fwr.readResults();
        }catch(Exception e){
        }
    }
    else{
        // troubleshoot....
    }
cmd /c python duplicatetestingoriginal.pyinto Start -> Run...?duplicatetestingoriginal.pyisn't in the current directory when you run the Java code? Maybe put in the full absolute path there?catch (Exception e)and then drop it. Maybe an Exception is being thrown? Couldn't hurt to add ae.printStackTrace();while debugging.