Hi all,
I'm in a bit of a pickle. I'm going through Ben Fry's Visualizing Data book (I'm on chapter 5) and I just ran into an error that has me stuck. For those familiar with the book, I had the baseball example running up to the point of adding interaction.
On to the problem. My problem started as I was adding in code to complete the next section of the chapter. When I clicked "Run", the code failed on the first constant variable I had which was something like
Code:static final int ROW_HEIGHT = 23;
This had worked fine through several iterations of refining the code while following along in the chapter. This time, however, all I got was a nasty error, "Illegal modifier for parameter ROW_HEIGHT; only final is permitted."
Having just added some code, I thought that perhaps that may have caused the problem. So, I commented out the new code. Same error popped up. Then I commented out everything but the offending line. The same error still occured. Next, I created a brand new sketch which contained only the single line:
Code:static final int FOO = 42;
This too failed in the same way.
Removing the static keyword does in fact allow the sketch to run, but I was under the impression that this is not the best practice in Java as without the static keyword, the variable can still be modified by the constructor. Though that is unlikely in this situation, I am more concerned that if something is wonkers here, it may be wonkers elsewhere.
Sorry, but I'm a complete Processing and Java neophyte. So let me know if there is more information needed. I am using Processing 1.0.5 and some system information follows.
jonathan@jonathan-desktop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty
jonathan@jonathan-desktop:~$ uname -a
Linux jonathan-desktop 2.6.28-15-generic #48-Ubuntu SMP Wed Jul 29 08:53:35 UTC 2009 x86_64 GNU/Linux
jonathan@jonathan-desktop:~$ java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)