Sublime Forum

Processing Build: [WinError 2] The system cannot find the file specified

#1

Hi,
trying to build and run a very simple example of a Processing 3.3 sketch from inside Sublime on Windows 10 via the package manager processing package to no avail.

Here is the error message:

[WinError 2] The system cannot find the file specified
[cmd: [‘processing-java’, ‘–force’, ‘–sketch=C:\Users\tomi\Desktop\sociometric\image_processing_sketch’, ‘–output=C:\Users\tomi\Desktop\sociometric\image_processing_sketch/build-tmp’, ‘–run’]]
[dir: C:\Users\tomi\Desktop\sociometric\image_processing_sketch]
[path: C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Skype\Phone;C:\Program Files\LLVM\bin;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\GNU\GnuPG\pub;“C:\Program Files\processing-3.3.4”;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\tomi\AppData\Local\Microsoft\WindowsApps;]
[Finished]

When I run following command in the console, it runs no problem, so it must be something about the way sublime is executing this or how it is handling the path variable??
processing-java --force --sketch=C:\\Users\\tomi\\Desktop\\sociometric\\image_processing_sketch --output=C:\\Users\\tomi\\Desktop\\sociometric\\image_processing_sketch/build-tmp --run

The processing.sublime-build looks like this:

// If you chose to install processing-java in your home dir then change cmd to “~/processing-java” instead of “processing-java”
{
“selector”: “source.pde”,
“cmd”: [“processing-java”, “–force”, “–sketch=$file_path”, “–output=$file_path/build-tmp”, “–run”],
“file_regex”: “^(…?):([0-9])”,
“encoding”: “ISO8859-1”,
“osx”: { “path”: “/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME” },

“variants”: [
{ // Close old sketch on build.
“name”: “Re-run sketch” ,
“windows”: {
“shell_cmd”: “wmic process where “Caption Like ‘%java.exe%’ AND CommandLine Like ‘%$file_base_name%’” call terminate 1>nul && processing-java --force --sketch=”$file_path" --output="$file_path/build-tmp" --run"
},

  	"osx": {
  		"shell_cmd": "pkill -f \\$(basename \"$file_path\"); processing-java  --force --sketch=\"$file_path\" --output=\"$file_path/build-tmp\" --run"
  	},
  	"linux": {
  		"shell_cmd": "pkill -f \"java.*$file_path\\$\"; processing-java --force --sketch=\"$file_path\" --output=\"$file_path/build-tmp\" --run"
  	}
  },
  {
    "cmd": ["processing-java", "--force", "--sketch=$file_path", "--run"],
  	"name": "Run sketch (Processing 3 only)"
  },
  {
    "cmd": ["processing-java", "--force", "--sketch=$file_path", "--output=$file_path/build-tmp", "--present"],
  	"name": "Run sketch fullscreen"
  },
  {
    "cmd": ["processing-java", "--force", "--sketch=$file_path", "--output=$file_path/application", "--export"],
  	"name": "Export sketch as application"
  },
  {
  	"name": "Kill running sketches" ,
  	"windows": {
  		"shell_cmd": "wmic process where \"Caption Like '%java.exe%' AND CommandLine Like '%$file_base_name%'\" call terminate 1>nul"
  	},
  	"osx": {
  		"cmd": "pkill -f ${project_base_name:\\$(basename \"$file_path\")}", "shell": true
  	},
  	"linux": {
  		"shell_cmd": "pkill -f \"java.*$file_path\\$\""
  	}
  }

]
}

I tried changing the "cmd"s to “shell_cmd” and different variations on changing the path that is executed, escaped quotes etc… nothing works. I know there are a lot of threads about this, but i can’t for the life of me find a solution in those. It seems to be such a simple task to execute…

Can you help me?
sincerely,
Tamás

0 Likes