-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Array index out of bounds error using java-processing in terminal #2152
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
Comments
I just spend some time reading Commander.java and Sketch.java files, and what caught my attention is that you're using number 1 as your sketch folder
Sketch folders should have same name as sketches and sketches cannot have numerical names. |
Nope, that totally explains it. It worked, then I changed the folder name, then before I ran it I went home, so I didn't connect changing the folder/sketch name with the fact that it stopped working. Is there any possibility of changing the requirement for names to be non-numerical? What is the reason that sketch names have to be non-numerical? |
The requirement for sketches to have non-numerical names is fundamental. (Also since introduction of Android mode, they can neither start with underscore _ character). The main reason for sketch names to have non-numerical names, is that your sketch 1.pde void setup(){
size(200,200);
}
void draw(){
// do nothing
} will be preprocessed (converted) into java source file: import processing.core.*;
class 1 extends PApplet{
void setup(){
size(200,200);
}
void draw(){
// do nothing
}
} and after that compiled with java compiler. As you can see the name of the sketch is used as the name of the class. Java prohibits class names which start with numbers. This is where fundamental nature of sketch names comes from. Hope this helps, and I guess you may "close" the issue on github now. |
Ok, I see. Thanks for your help. |
It would be nice to throw a more understandable error though... |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
I keep getting the following error whenever I try and run any sketch:
This happens when I'm not even using arrays with my code. I made sure it wasn't my code by testing with the following sketch:
The weird thing is though, it works sporadically. When I was using it today in class, it worked fine. When I got home though, it started giving me this error.
Any help would be much appreciated. Thanks!
The text was updated successfully, but these errors were encountered: