Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will not work on windows #17

Closed
phoenixperry opened this issue Jan 29, 2013 · 36 comments
Closed

Will not work on windows #17

phoenixperry opened this issue Jan 29, 2013 · 36 comments

Comments

@phoenixperry
Copy link

I get this error on Build.

[Error 2] The system cannot find the file specified
[cmd: [u'processing-java', u'--sketch=C:\Users\phoenix\Documents\Processing\basic.pde', u'--output=C:\Users\phoenix\Documents\Processing\basic\build-tmp', u'--run', u'--force']]
[dir: C:\Users\phoenix\Documents\Processing\basic]
[path: C:\Users\phoenix\Documents\processingTwo]
[Finished]

In sysdm.cpl I added the following to the environmental variables > User variables for phoenix
path = C:\Users\phoenix\Documents\processingTwo

Thoughts? I even tried spelling processing differently to make sure it wasn't some character issue.

@b-g
Copy link
Owner

b-g commented Jan 30, 2013

hi pp, odd! does the command work in the normal os terminal? e.g. open CMD, go to the sketch folder, and run something like:
processing-java --sketch=C:\Users\phoenix\Documents\Processing\basic\basic.pde output=C:\Users\phoenix\Documents\Processing\basic\build-tmp --run --force ? it seems for me this is rather a non sublime text problem and a possible not working processing-java installation. please confirm. good luck! b

@b-g
Copy link
Owner

b-g commented Jan 30, 2013

ah and please make sure that you sketch is inside a folder with the same name: basic/basic.pde ...

"C:\Users\phoenix\Documents\Processing\basic.pde" is definitely a non valid processing folder structure! :)

@alexanderlperez
Copy link

I had a similar problem recently.

The name of a folder in my build path had a space: 'conway life'. I renamed it to 'conway_life', as the command once run on the terminal would be malformed due to errant white-space.

Hope that helps anyone coming from Google!

@b-g
Copy link
Owner

b-g commented Mar 5, 2013

hi alexander, thanks for sharing! do you know whether you can "mask" somehow the whitespaces in sublime/windows?

@alexanderlperez
Copy link

A simple solution? Use filenames without whitespace. Done and done.

@b-g
Copy link
Owner

b-g commented Mar 6, 2013

+1
:)

@phoenixperry
Copy link
Author

FYI I never use spaces in file names and still was having the issue. I haven't tried your earlier solution yet - I don't use processing everyday (only as a rapid sketch tool). Next time I do, I'll let you know how it goes though with your fix.

@ins
Copy link

ins commented Mar 23, 2013

Same [Error2] here, but windows restart solved it.

@MAKIO135
Copy link
Contributor

i created a "Processing (Windows).sublime-build":
{
"path": "$file_path\temp",
"cmd": [
"C:\Users\Makio135\Downloads\processing-2.0b8\processing-java.exe",
"--sketch=$file_path",
"--output=$file_path/build",
"--force",
"--build",
"--run"]
}

You just need to edit the path to your processing-java.exe. Can be faster than add environment variables

@b-g
Copy link
Owner

b-g commented Mar 28, 2013

@MAKIO135 thanks for sharing!

@MAKIO135
Copy link
Contributor

thanks to you; got a few other propositions for processing-sublime but don't really know where to start, perhaps should fork the repo and submit merges? (not a pro githuber)

@b-g
Copy link
Owner

b-g commented Mar 29, 2013

@MAKIO135 i added a link to your comment to the readme ... and yes please! would be nice to get some input from your side! but please don't do then in the very end just one huge everything or nothing pull request. i prefer small ones, so that we can have a discussion around particular things, rather then a complete restructuring of the whole bundle because you prefer a certain folder/naming structure etc.

good luck!

@b-g b-g closed this as completed May 22, 2013
@julienborrel
Copy link

I try the sublime-build for windows from @MAKIO135 and I get some "character escaping" error, so I change it like this to make it works:

{
"path": "$file_path\\temp",
"cmd": [
"C:\\Users\Makio135\\Downloads\\processing-2.0b8\\processing-java.exe",
"--sketch=$file_path",
"--output=$file_path/build",
"--force",
"--build",
"--run"]
}

Thanks anyway!

@dvekedy
Copy link

dvekedy commented Apr 19, 2015

Dear gentelmen,

I have carefully read your posts, but unfortunately did not understand how to solve the same problem.

I have the following message in Sublime Text 2:

"[Error 2]
[cmd: [u'processing-java', u'--sketch=', u'--output=/build-tmp', u'--run', u'--force']]
[dir: C:\Windows\System32]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0]
[Finished]"

What does it mean?

Please, could you explain to me, as a child, :) what step by step I need to take to solve the problem with preocessing-java.

I have:
Windows 8.1 x64
The latest version Processing x 32 and Sublime Text 2 x64

I would be very grateful for any help and tips!

@b-g
Copy link
Owner

b-g commented Apr 20, 2015

Hi @dvekedy!

You have to install the processing command line tool (processing-java) to your windows. The error message basically says "sublime text can't run processing-java in the command line". Please carefully check and read: https://github.com/b-g/processing-sublime#windows

Hope that helps!
B

@foong
Copy link

foong commented May 18, 2015

hi guys, i have tried all the steps from the read me, it works fine for my windows 8 but it doesnt seem to work on my laptop with windows 7, without "Processing (Windows).sublime-build" but adding environmental variables it gives me this error.

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\FOONG\AppData\Local\Temp\jna-FOONG\jna9100761614979794647.dll: Access is denied
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:752)
at com.sun.jna.Native.loadNativeLibrary(Native.java:737)
at com.sun.jna.Native.(Native.java:129)
at processing.app.platform.WindowsPlatform.(WindowsPlatform.java:503)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at processing.app.Base.initPlatform(Base.java:239)
at processing.mode.java.Commander.main(Commander.java:74)
[Finished in 0.9s with exit code 1]

I've tired adding in the "Processing (Windows).sublime-build"
and it says, error trying to parse built system, invalid escape.....
and i have tried both of the built above.

i also tried directing it to processing-java.exe instead of just processing-2.2.1
in the environmental variables. any help and tips?

@b-g
Copy link
Owner

b-g commented May 19, 2015

Hi @foong! Sorry to hear that this is such an hustle for you ... but could you please confirm whether you can run 'processing-java' on the windows command line without problems? Basically the Processing Bundle for Sublime Text just calls this command every time you press 'build'.

@foong
Copy link

foong commented May 19, 2015

i tried in command prompt and this erro came out.
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\FOONG\AppData\Local\Temp\jna-FOONG\jna9100761614979794647.dll: Access is denied
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:752)
at com.sun.jna.Native.loadNativeLibrary(Native.java:737)
at com.sun.jna.Native.(Native.java:129)
at processing.app.platform.WindowsPlatform.(WindowsPlatform.java:503)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at processing.app.Base.initPlatform(Base.java:239)
at processing.mode.java.Commander.main(Commander.java:74)
what does it mean?

@b-g
Copy link
Owner

b-g commented May 19, 2015

@foong Then I'm afraid it is a processing-java command line tool error ... which has nothing to do with the processing bundel for sublime text. I furthermore have no idea what this means. Sorry! Maybe ask in the processing forum?

@foong
Copy link

foong commented May 19, 2015

@b-g Oh, alright then, i will. Really appreciate the help. Thanks again!

@ghost
Copy link

ghost commented Jun 18, 2016

am using the build system from @MAKIO135, when I ctrl+b it outputs

Finished.
[Finished in 1.5s]

but does not run the sketch. What am I doing wrong here?

@ybakos
Copy link
Collaborator

ybakos commented Jun 19, 2016

@jripp122 Please specify the version of Processing you're using, and your OS. Also, try running processing-java manually to see if it works. Lastly, ask @MAKIO135 .

@amytraylor
Copy link

@jripp122 When it says "Finished" without actually building anything it is usually because you have white space in your file/folder names or you began the name with a number.

@Quillbert
Copy link

I used makio135's build system, but when I tried to build, nothing happened, and it said no build system next to the line and column numbers. I know I had the build system selected. Does anybody know what could be wrong?

@varunsingh87
Copy link

@Quillbert one mistake I had made was making the path to processing and not processing-java.

@Quillbert
Copy link

I checked the path, but it still says no build system.

@varunsingh87
Copy link

Can you send me the code for the sublime-build you used

@Quillbert
Copy link

I used this code:

{ "path": "$file_path\temp", "cmd": [ "C:\Users\andrewhamby22\Desktop\processing-3.4\processing-java.exe", "--sketch=$file_path", "--output=$file_path/build", "--force", "--build", "--run"] }

@varunsingh87
Copy link

I:

  1. Put the path to processing in the environmental variable
  2. Downloaded the zip of the processing (which I don't think helped)
  3. CTRL - P and installed the processing package.
  4. Ran it with this processing package anddeleted processing (widnows)

@Quillbert
Copy link

I tried using this package with the path, but it just got me an error. Command Prompt is disabled on my computer, and I was wondering if that could be the problem.

@shreym03
Copy link

@jripp122 When it says "Finished" without actually building anything it is usually because you have white space in your file/folder names or you began the name with a number.

Is there a way I can work around this error. My username for the file path ( C:\Users\Shrey Mathur\Documents\Processing ) has the whitespace in it and I feel like it's better for the build to work at any location rather than a specific one

@amytraylor
Copy link

amytraylor commented Apr 11, 2019 via email

@shreym03
Copy link

shreym03 commented Apr 11, 2019

@amytraylor No, the problem is with is because of the file path. I think I should clarify why I came to the conclusion.
So I tried the build and got the same issue as @aoeu1234. So I went to the command prompt, went to the file where path where processing-java was ( which is in a public folder C:\Program Files\processing-3.5.3). And I typed the code
C:\Program Files\processing-3.5.3>processing-java.exe --sketch=C:\Users\Shrey Mathur\Documents\Processing\sketch_190411a --output=C:\Users\Shrey Mathur\Documents\Processing\sketch_190411a/build --force --run
I got the error
C:\Users\Shrey does not exist

I then tried the same thing with quotes around the white space (...\" Shrey Mathur"\...) and then it seemed to work. But I don't know how to translate that to the file path in the sublime build. Any suggestions as to what to try?

P. S. I tried putting quotes around the file path variable (..."--sketch=\"$file_path\"",...) and that didn't seem to work.

@hijomojo
Copy link

hijomojo commented Jul 28, 2019

I then tried the same thing with quotes around the white space (...\" Shrey Mathur"\...) and then it seemed to work. But I don't know how to translate that to the file path in the sublime build. Any suggestions as to what to try?

P. S. I tried putting quotes around the file path variable (..."--sketch=\"$file_path\"",...) and that didn't seem to work.

I've had this same issue as you and @aoeu1234 (just in case ... sorry for the necropost)

What I've just found is that sublime's $file_path handles spaces in paths just fine, so you don't need to try to add more "" into the path (unless you're personally running it in CMD, as you found).

What I had to do was remove "--build" from the command for it to actually run. the --run option includes everything --build does, but it appears that having --build in there seems to cancel --run. I've just tested this in both cmd and sublime and it works in both.

I also had to change all the '' for '/' in the path to processing-java.exe

@hijomojo
Copy link

For anyone interested in the future, here is another sublime-build which will kill the previously built running window of your sketch (if you didn't manually close it), then build and run a new one. This makes 'Build' much more like using 'Run' in the Processing IDE.

You'll need to use \\ for \ and \" for " in your paths as shell_cmd requires special characters like those to be escaped.

Obviously, also swap this bit: DRIVE:\\YOUR\\PATH\\TO\\processing-x.x.x\\processing-java.exe with the correct path to processing-java.exe for your computer.

{
	"path": "$file_path\temp",
	"shell_cmd": "C:\\Windows\\System32\\Taskkill.exe /FI \"WINDOWTITLE eq $file_base_name\" /F && DRIVE:\\YOUR\\PATH\\TO\\processing-x.x.x\\processing-java.exe --sketch=\"$file_path\" --output=\"$file_path\\build\" --force --run"
}

@designcode360
Copy link

Darn spaces!

I'm on a PC running Windows 10. Pulling my hair out trying to get Processing to build from Sublime text 3. The "problem" was a SPACE in my folder name. My error is I followed a tutorial in which the instructor was using a MAC. Mental note!! NEVER use Spaces on a PC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

16 participants