[HELP] Launch4j - An error occurred while starting the application.

I'm W7 64bit. I had the same problem using the Windows installer.

I uninstalled, downloaded the latest zip and unzipped to c:\arduino

I then followed the instructions


When I ran arduino.exe I was asked for java permissions and it all seems to work now.

Anti virus software can block Java, disable it temporarily.

Look for the Bluetooth icon in the right of the window taskbar. Right click on it and click on turn OFF bluetooth adaptor. 8)

I’m having the same problem. Tried all the tips and tricks in the forum but no luck.
Args length: 272/32768 chars

I wrote about this headache on June the 16th and only one guy replied but lots and lots of peple must be having this problem so Why on Earth cant some bod sort out this millais its and absolute scandle

On June the 16th I wrote:
Help is sought, if it is available.

Arduino IDE., starts: shows the usual Arduino blue panel; hangs for about 60 seconds then disappears leaving a warning box that states “An error occurred while starting the application”.

I have been running the Arduino IDE., for some years now quite successfully until yesterday when my Windows system was updated. Unfortunately System Restore Protection was switched off and not by me.

Has anybody got the methodology and or knowledge to enable me to run this program please. Downloading a completely fresh system download has no effect, ie., it still will not run and provides the self same warning box.


Another Solution.

Arduino IDE decided to create a nested folder in C:\Users\cwcarver\Documents\Arduino. It created 2410 nested folders within the sub-folder "libraries". This prevented me from launching the Arduino IDE. I tried all of the other solutions provided, from reinstalling Java, reinstalling the IDE (both 1.0.5 to the latest nightly build), turning off Bluetooth, and unplugging my Arduino. Nothing seemed to fix the issue until I found the left over angst of Arduino creating 2410 nested folders. I am assuming Arduino took out it's anger on me for some unknown reason to create a recursive nightmare on my file system.

The problem is Windows cannot delete 2410 nested folders; even the SHIFT-DEL will not work.

There are two solutions; quick temp fix and solution.

Temp Fix: Rename the C:\Users\cwcarver\Documents\Arduino folder to something else. I renamed mine to C:\Users\cwcarver\Documents\TOAST. This will allow the Arduino IDE to start normally.

Solution: Like I said, normal delete on Windows will not work. However there is a Windows command that is powerful enough to delete the nested folders; robocopy. Open up Command Prompt and type in these commands. Make sure to change the directories to fit your system.

cd C:\ mkdir Toast robocopy C:\Toast C:\Users\cwcarver\Documents\Arduino /purge rmdir Toast

The third command will take a long, long, so very long time to run. This is because robocopy is traversing all of the directories one by one and printing them to the screen. (For me it felt like 30 mins.) The command replicates the empty directory called Toast over the C:\Users\cwcarver\Documents\Arduino directory. Any differences found will be purged; aka deleted.

Once the commands are done, I could start my Arduino IDE with no problem.

i have same error.

if u have bluetooth .Turn off bluetooth and also rename the java folder in location C;/program file/arduino/ it will work definitely

I had the same error after updating java ->

launch4j - an error occured while starting the application

I deleted the C:\Users\USER\Documents\Arduino folder, afterwords i was able to start the arduino IDE.

I solved the issue deleting the infinites sub-directories under C:\Users\"user"\Documents\Arduino\libraries !

I think it's a scandal that the Arduino has still not fix this problem !

P.S: I deleted the infinites sub-dir with the "unlocker" (emptytool software)


Hi all, this is my first (but not least) post

I had the same broblem with WIN 7 arduino launch4j problem and i fixed it by doing some simple steps.
As you will notice, when the program starts and trying to run, you CPU lever will go up to 50% or more!
That’s because the “infinite loop”. Now do these steps exactly. (I have no responsibility so be carefull)

  1. Open the task manager (alt+Ctrl+Del) from keyboard and choose “task manager”

  2. Delete EVERY java* reference you will find there.

  3. Now your CPU level must be under 10% which is OK

  4. Open your C:\users<your user name>\Appdata\Roaming\Arduino and make a backup of preferences.txt in a safe place and then DELETE IT

  5. Now try to run arduino programm again and after succesfully enter, give again the appropriate settings.

Hope these steps helps. (At least they helped me!)

P.S. Don’t forget to adjust your WIN 7 preferences to make Appdata dir accessible.

You may have a problem in your library folder,default path is My Documents\Arduino\libraries\ cut and paste the libraries folder to My Documents so there is no longer a libraries folder in My Documents\Arduino\ restart and see if that was the issue you can then copy the libraries back one by one to find the problem library.

guys.. help... i have a project to complete.. this arduino doesn't start. i get "an error occurred while starting the application" launch 4j error.. i dunno what to do.. guys plz help... i tried everyfin possible...

Just fixed my Launch4J error following some of the advice on this thread. I was running 1.0.5 r2 without an issue on my main PC which is running Windows 7 64bit. I've been bench testing a project called Ardomotic which is amazing. I finally put Ardomotic to work. I moved it from my test bench to a different network location and connected it to my server which runs server2003 32bit. I installed 1.0.5-r2 on the server. It installed and launched fine but when I tried to upload the Ardomotic libraries the IDE hung and I had to force it to close. After which when I tried to launch IDE my processor would go to 70% running a file called javaw.exe and after about 40 seconds would give the Launch4J error. I search every available forum and tried all of their tricks. I removed the Arduino Application Data folder under user, reinstalled java, swapped the java file with my working computer, uninstalled Arduino IDE and reinstalled (about 10 times), cleaned the registry, blah blah and blah - everything I tried did not help...until today! I discovered in my documents there is a folder called Arduino, in that folder there was a subfolder called Libraries - in that folder there was about 2000 subfolders all called Libraries nested off each other. I could not delete or rename these as it generated a filename to long error. I even tried using rmdir/s and del/s at the command prompt without success. Finally I found a program called "Long Filename tool". Unfortunately it found the nested folders but would not delete them unless I purchased a license for $29. So after a little paypal action I deleted all of those library folders and IDE started right up. It seems one of those libraries was corrupt and when it was uploaded screwed everything up. I unzipped a fresh copy, uploaded them, and off we went.

Problem fixed!

Thanks to jknutter and others describing the “indefinete/libraries” -problem.

Before that I uninstalled arduino and java several times, no help.

But I had also a lot of nested “libraries” -directories in my Arduino library which I was not able to delete.

— clip —
Directory of C:\Users\xxxxxulmisxxxx\Documents\Arduino*

1.02.15 17:36 libraries
bytes in 0 files and 1 dir

— clip —

When I renamed Arduino to ArduinoBroken, I managed to launch IDE again! (And a new Arduino directory was created.)

Now 2 questions

-what creates this looong chain of libraries?! A bug in Arduino somewhere but where? Anyway, this has happened to many of us… I am surprised that there are no other solutions to this… IT WILL HAPPEN AGAIN TO SOMEONE

-how can we clean these broken directories safely without such tricky tools?

@jknutter : in the subfolder Libraries , i have not found any subfolders called Libraries nested off each other.


I have been following this problem for some time now and have tried to fix it using some of the suggestions listed. NO LUCK !!

The problem for me is, I am not a computer guy. all I want to do is run my arduino IDE and play with some code. most of the fix's are beyond my computing skills.

This seems like a problem with the Arduino IDE code. so what are the people back at Arduino doing about it?

I have the Arduino IDE installed on two computers and they both have crashed. same problem "Launch4j error" what am I supposed to do? just throw away months of work and forget about it.

To me this is serious. please Arduino people, get with the program! "Pun intended" put this thing to rest once and for all.

paul-y have you already tried latest 1.6.0?

I had similar problems. I think it came form the fact that my Arduino sketch folder was on a network drive. Putting the Arduino folder on C:\ seem to have solved the problem for now.

The problem was then to delete the nested folder (6000+ !!). Neither robocopy nor unblocker worked, but I finally managed to remove of all the junk folders using https://deepremove.codeplex.com/. Thought it might be useful to someone else.

Well I was really hoping that someone from Arduino HQ. would jump in here and help us out but I guess not!

I went to the "DEEPREMOVE" sight but I could not figure it out. "thanks SarahN".

Yes "Federico" I am using 1.6.0 on Windows 8.1. it worked ok for a while then crashed. "launch4J error". also have 1.6.0 on another computer, windows 7 and it worked fine but started to slow down and eventually crashed. same problem. "Launch4J error"

How can there be so many different solutions to the same problem? is it possible there could be more than one problem that can cause a Launch4J error?

I am starting to get that sinking feeling..... looks like all my work is lost!

looks like all my work is lost!

Why? Did you delete all your .ino files? If not, they are not lost.

I don't think I deleted any of my program files, but if I can't get the Arduino IDE to run what can I do with them?