"An error occurred while starting the application"... Arduino acts weird! HELP!

Arduino IDE was working properly in my pc. Today while starting IDE, it took looong time and gave me the error "An error occurred while starting the application", error box had title "Launch4j". After that the application started, compiled my program without effort... but while uploading to board, it gave lots of java exception and stopped. =( It also hangs frequently.
A thing to notice, yesterday I ported to 0023 from 0022.

Pease Help! :expressionless:

Regarding error measage 'Launch4j'.
I got the same error when I was trying to run after upgrade to 1.0 :0
I traced it to preferences file located in C:\Documents and Settings'me as user'\Application Data\Arduino preference.txt
I just deleted it - and system the runs :smiley:

I'm getting the same error with my Arduino Uno. What should I do?

ArduinoFailure.PNG

I get the same error on my Win 7 Enterprise 64 bit machine.Lenovo laptop. WHy ???? Tried other version including the older 22 version but still error.

Delete the preferences file: Windows XP: C:\Documents and Settings\USER_NAME\Application Data\Arduino preferences.txt

Windows 7: C:\Users\USER_NAME\AppData\Roaming\Arduino\preferences.txt

My Windows 7 operating system does not go:
C:\Documents and Settings\USER_NAME\Application Data
That's Windows XP

Windows 7 goes:
C:\Users\USER_NAME\

tpirman1982:
My Windows 7 operating system does not go:
C:\Documents and Settings\USER_NAME\Application Data
That's Windows XP

Windows 7 goes:
C:\Users\USER_NAME\

Then:

Windows 7: C:\Users\USER_NAME\AppData\Roaming\Arduino\Preferences.txt

kd7eir:
Then:

Windows 7: C:\Users\USER_NAME\AppData\Roaming\Arduino\Preferences.txt

Uh, nope, nope. That did not work either. Nope, nope.
The preferences.txt file keeps coming back every time I try to start it up.

Try to use older versions of the Arduino software, this worked for me.

2 out of 3 laptops that I own running windows 7 didn't work for me - looks like windows 7 compatibility is piss poor but then perhaps it's my Lenovo machines??? Of course this wouldn't happen on Macs or linux machines :slight_smile: but you gotta remember most of the world is sill stuck on Windoze.

In this video...

...I was told:

int Pin = 13;

void setup()
{
//initialize pins as outputs
pinMode(ledPin, OUTPUT);
}

void loop()
{
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
}

When I tried to upload that to my Arduino, I got an error which as follows:
In function loop': error: ledPin' undeclared (first use in this function)

What should I do to correct this?

At the top of the sketch, change int Pin = 13; to int ledPin = 13;

Ok. I've corrected that, but another error I've found is:
ledPin(pinMode, OUTPUT);

In function `setup':
error: called object is not a function

What'd I write incorrectly there?

kd7eir:
At the top of the sketch, change int Pin = 13; to int ledPin = 13;

This is the sketch as it runs for me, using Arduino 1.0.1:

int ledPin = 13;

 void setup()
 {
 //initialize pins as outputs
 pinMode(ledPin, OUTPUT);
 }

 void loop()
 {
 digitalWrite(ledPin, HIGH);
 delay(1000);
 digitalWrite(ledPin, LOW);
 delay(1000);
 }

Well, it's not accepting it on mine when I click upload.

kd7eir:
This is the sketch as it runs for me, using Arduino 1.0.1:

int ledPin = 13;

void setup()
{
//initialize pins as outputs
pinMode(ledPin, OUTPUT);
}

void loop()
{
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
}

Please post the entire error message that you are getting.

Highlighted part:
ledPin(pinMode, OUTPUT);

error: In function `setup':
error: called object is not a function

kd7eir:
Please post the entire error message that you are getting.

Look closely at this from my code: pinMode(ledPin, OUTPUT);

then at your error message:
Highlighted part:
ledPin(pinMode, OUTPUT);

error: In function `setup':
error: called object is not a function

You have things reversed.

I see. I'll keep y'all posted as time progresses.

kd7eir:
Look closely at this from my code: pinMode(ledPin, OUTPUT);

then at your error message:
Highlighted part:
ledPin(pinMode, OUTPUT);

error: In function `setup':
error: called object is not a function

You have things reversed.

I May have corrected those mistakes, but now when I try to upload to the board, the programmer stops responding.
What'd I do wrong this time?

Start by unplugging the Arduino from the computer, restart the computer.

Plug the Arduino in, open the Arduino IDE, verify that you have the correct board and COM port selected. Try to upload again.