Ubuntu 7.04 / java problems

Hi everyone,
I just got my board in the mail, and could get a serial comm script to work quite right so i tired loading up an example program:

void setup()
{
Serial.begin(9600);

// prints title with ending line break
Serial.println(“ASCII Table ~ Character Map”);

// wait for the long string to be sent
delay(100);
}

int number = 33; // first visible character ‘!’ is #33

void loop()
{
Serial.print(number, BYTE); // prints value unaltered, first will be ‘!’

Serial.print(", dec: ");
Serial.print(number); // prints value as string in decimal (base 10)
// Serial.print(number, DEC); // this also works

Serial.print(", hex: ");
Serial.print(number, HEX); // prints value as string in hexadecimal (base 16)

Serial.print(", oct: ");
Serial.print(number, OCT); // prints value as string in octal (base 8)

Serial.print(", bin: ");
Serial.println(number, BIN); // prints value as string in binary (base 2)
// also prints ending line break

// if printed last visible character ‘~’ #126
if(number == 126)
{
// loop forever
while(true)
{
continue;
}
}

number++; // to the next character

delay(100); // allow some time for the Serial data to be sent
}

When i compile this it compiles ok, but when i try to upload it to the board + execute it i get the following error(s) in the terminal:

Binary sketch size: 2316 bytes (of a 14336 byte maximum)

java.lang.NullPointerException
at processing.app.Serial.setDTR(Serial.java:480)
at processing.app.Uploader.flushSerialBuffer(Uploader.java:76)
at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:69)
at processing.app.Sketch.upload(Sketch.java:1699)
at processing.app.Sketch.exportApplet(Sketch.java:1761)
at processing.app.Editor$42.run(Editor.java:1955)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I am running Ubuntu 7.04 on an IBM thinkpad, the board is from adafruit and it’s a Diecimila.

I'm leaving this post for anyone having a similar problem. I didn't select a port

I'm leaving this post for anyone having a similar problem. I didn't select a port

I've also encountered this error if I've unplugged and replugged the Arduino USB connector too quickly, as noted here: http://code.rancidbacon.com/Arduino#Answers7.

--Phil.