Why am I getting this error and how do I fix it? I spent hours searching and am having little luck except discovering that file I/O is, ummm, problematic for beginners in Java.
I am experimenting with Processing 3.5.3 in Windows 7 64 bit and for now, targeting similar systems.
The error is; processing.app.SketchException: Not expecting symbol āUā, which is LATIN CAPITAL LETTER U.
I suspect the path is not expected to be part of the file name maybe. Edit: The example sketch for createWriter obviously works if only the file name is included, it writes the file in the same subdirectory as the sketch. I canāt use it like that in the application I am working on.
Edit: If youāre here for this kind of problem, skip to the bottom. The TLDR is there.
but for understand the error i see ( my first picture )
it is a JAVA STRING thing ( what allows \n == linefeed )
so it will not allow windows path string???
funny is only that you see a different error
even we both use same windows and processing
Thank you for your reply. You jogged my memory and it reminds me I gave you bad information.
I wrote āWin 7 64 bitā and that may be wrong. This system is Win 7 64 bit but ā I was trying to use an old sketch, really old, so I uninstalled Processing and installed the 32 bit version to get something or other working. (Iāve since abandoned that approach.) So my path environmental variable to java is āPATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;ā in the path statement, and on disk there is āC:\Program Files (x86)\Java\jre1.8.0_201\binā.
Sigh. I need to uninstall and start over with the Win64 distribution, I think.
Edit: It appears Iām using 64 bit Processing but with 32 bit Java. LOL.
-a- for the createWriter question
you used \ got error
i used / and it works
-b- for the version thing,
on windows 7 64bit you can download / unzip processing 32 bit or 64 bit
until now i could not make out the difference (speed?)
-c- for the used JAVA, each comes with a JAVA included
you could even in
so as it just works, i not understand what was not running,
anyhow i not see the relation to the
createWriter(filenamestringwithpath);
question.
pls. explain again.
no, sorry, that was not from my computer, from a old documentationā¦
sorry that it confused you, my mistake.
the java on your system looks ok.
again look my picture, i also have the 1.89.0.201 on my systemā¦
anyhow the one from the processing is usedā¦
! to be absolutely certain about this
i used a old hard disk with win7 32bit:
ā deleted all processing ( unzips )
ā deleted all sketchdir
ā deleted the c:\users\user\AppData\Roaming\Processing
( where also the preferences.txt file is )
and
ControlPanel/Programs and Features /
uninstall JAVA 8
so again, processing windows comes with JAVA and not need
a java on windows system,
also, i made that mistake already, i used the CMD terminal window and run
JAVA -version
you get the one from system, so that is not related to processing.
Iāve spent a lot of time trying to find out if Iāve got the wrong Java, LOL.
And now Iām just confused. I donāt know if I can use the latest version of Java, I donāt know if installing it will break this program. I donāt know why I canāt specify the path with that command. I donāt know if I have to use a different command to be able to specify the path. Iāve done file operations before, using other languages. I donāt know why they have to be so bureaucratic in Java. And, I donāt know why the sketch works on your system but not mine.
I really donāt want to change languages again. LOL
The backslash happens to be an escape character for special characters in Processing.
So double-escape them when intending to actually use the backslash, like in a Windows pathname. āC:\\directory\\file.extā. And in this instance at least, the file extension is necessary.
That is correct ā it gets this from Java, and is part of string handling ā for example, it allows you to include a " character in a String. From the reference:
Because backslash is the escape character, to include a single backslash within a String, you must use two consecutive backslashes, as in: \\ String / Reference / Processing.org