0
votes

I am trying to use bleikamp's Processing package to run Processing sketches from the Atom editor. The package has installed correctly, but running a sketch produces the below error:

'processing-java' is not recognized as an internal or external command, operable program or batch file.

I have added the path to my Processing directory to the PATH environment variable. Can anyone suggest why this is not working?

2
Does running processing-java in the Command Prompt output the same error? - codemacabre
@CodeMacabre Yes - Chris Hamilton
Can you try running processing-java.exe using your entire processing directory path in the Command Prompt? For example, for me: "c:\program files\processing\processing-java.exe" - codemacabre
@CodeMacabre This executed fine - Chris Hamilton
Hmm, it sounds like the path to your Processing directory is incorrectly listed in your PATH. Can you double-check the Processing path you used in the command above is exactly the same as listed in your PATH? - codemacabre

2 Answers

2
votes

The problem is almost certainly to do with your PATH. As you've checked the Processing path is correct, there may be something preventing it from being recognised (there are some known issues, such as the PATH variable being too long or having invalid characters).

Solution 1:

Try using FixPath to fix some of the more common problems.

Solution 2:

Try modifying the processing package itself to point directly to processing-java.exe (it points to the PATH variable by default).

  • In Atom's Settings > Packages, select the processing package and click on 'View Code'.
  • Make a backup of \lib\processing.coffee to be safe.
  • In \lib\processing.coffee, search for the following code (probably near the top):

    module.exports = Processing =
      config:
        'processing-executable':
          type:"string",
          default:"processing-java"
    
  • Modify the value of default to point to the exact Processing directory and processing-java.exe, for example:

    module.exports = Processing =
      config:
        'processing-executable':
          type:"string",
          default:"c:\\program files\\processing\\processing-java.exe"
    

As Chris rightly points out in the comments below, backslash \ is an escape character in JavaScript and CoffeeScript, so itself needs to be escaped in the file path (hence the double-backslashes \\).

0
votes

You have to install processing-java command line tool.

In processing, go to Tools -> Install "processing-java"