Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: iddbbi on May 21, 2013, 12:53 pm

Title: [HELP] Launch4j - An error occurred while starting the application.
Post by: iddbbi on May 21, 2013, 12:53 pm
Hi,

I am using Arduino Mega 2560 R3, running on Windows 8 Pro 64bits.

Every time I want to open the Arduino 1.0.5, it will take time and in the end the popup error of "Launch4j - An error occurred while starting the application." showed.

I have tried some suggestions from this forum such as editing the preferences.txt, using a.cmd, install/reinstall, but the same issue still occurred.

So, anyone have any possible solutions to solve this issue?  =(

Thank you very much.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Louis Davis on May 21, 2013, 04:01 pm
From a command line, launch arduino.exe with the following command:

arduino.exe --l4j-debug

Then post the results of the launch4j.log file in the Arduino folder to see if that tells us anything.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: iddbbi on May 21, 2013, 11:02 pm

From a command line, launch arduino.exe with the following command:

arduino.exe --l4j-debug

Then post the results of the launch4j.log file in the Arduino folder to see if that tells us anything.


thanks for your reply. unfortunately the same thing happened. =(
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Louis Davis on May 21, 2013, 11:10 pm
Of course the same thing happened. This was not supposed to fix anything.

I need to see the log file to determine what is going on.

"Then post the results of the launch4j.log file in the Arduino folder to see if that tells us anything."
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: iddbbi on May 22, 2013, 03:24 am

Of course the same thing happened. This was not supposed to fix anything.

I need to see the log file to determine what is going on.

"Then post the results of the launch4j.log file in the Arduino folder to see if that tells us anything."


I've tried on arduino-1.5.2. Here is the result:
Code: [Select]


CmdLine: C:\Users\iddbbi\Desktop\arduino-1.5.2\arduino.exe --l4j-debug
WOW64: yes
Working dir: C:\Users\iddbbi\Desktop\arduino-1.5.2\.
Bundled JRE: java
Check launcher: C:\Users\iddbbi\Desktop\arduino-1.5.2\java\bin\javaw.exe (OK)
Add classpath: lib\pde.jar
Add classpath: lib\core.jar
Add classpath: lib\jna.jar
Add classpath: lib\ecj.jar
Add classpath: lib\RXTXcomm.jar
Add classpath: lib\commons-exec-1.1.jar
Launcher: C:\Users\iddbbi\Desktop\arduino-1.5.2\java\bin\javaw.exe
Launcher args: -Xms128m -Xmx128m -classpath "lib;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar;lib\commons-exec-1.1.jar" processing.app.Base
Args length: 145/32768 chars
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Louis Davis on May 22, 2013, 05:07 am
Nothing obvious in the log.

Do you have bluetooth? Disable bluetooth and see if that helps. Sometimes that will cause a long delay and will cause the app to timeout.

Also, try moving the Arduino folder from the Desktop.

I always run mine from a folder like c:\arduino\arduino-1.0.4, etc.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: iddbbi on May 23, 2013, 04:58 am

Nothing obvious in the log.

Do you have bluetooth? Disable bluetooth and see if that helps. Sometimes that will cause a long delay and will cause the app to timeout.

Also, try moving the Arduino folder from the Desktop.

I always run mine from a folder like c:\arduino\arduino-1.0.4, etc.


I have disabled the bluetooth adapter and moved the directories, but the same issues happened. =( Do I need to downgrade to Windows 7?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: niq_ro on Jul 10, 2013, 03:06 pm
I had the same error at startup and I closed my bluetooth program (IVT BlueSoleil) that run in the background for a normal running of Arduino, you must see a movie with screenshot: http://youtu.be/SLxHs6l9x_w (http://youtu.be/SLxHs6l9x_w)
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: anaclaudiaso on Jul 10, 2013, 04:42 pm

Hi,

I am using Arduino Mega 2560 R3, running on Windows 8 Pro 64bits.

Every time I want to open the Arduino 1.0.5, it will take time and in the end the popup error of "Launch4j - An error occurred while starting the application." showed.

I have tried some suggestions from this forum such as editing the preferences.txt, using a.cmd, install/reinstall, but the same issue still occurred.

So, anyone have any possible solutions to solve this issue?  =(

Thank you very much.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: FreeOwl on Jul 17, 2013, 04:50 am
Same here on Win7 x64 - takes a lot of time to start and after that an error message shows up: Launch4j - An error occurred while starting the application.

Here is my log but nothing obvious:
CmdLine:   D:\Projects\Arduino\arduino.exe --l4j-debug
WOW64:      yes
Working dir:   D:\Projects\Arduino\.
Bundled JRE:   java
Check launcher:   D:\Projects\Arduino\java\bin\javaw.exe (OK)
Add classpath:   lib\pde.jar
Add classpath:   lib\core.jar
Add classpath:   lib\jna.jar
Add classpath:   lib\ecj.jar
Add classpath:   lib\RXTXcomm.jar
Launcher:   D:\Projects\Arduino\java\bin\javaw.exe
Launcher args:   -Xms128m -Xmx128m -classpath "lib;D:\Projects\Arduino\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar" processing.app.Base
Args length:   159/32768 chars

Any ideas?

[UPDATE1]I tried every suggestion above and in the other posts. Installing 1.5.2 does not fix it either.
Is there a way to enable the log in more verbose mode where I can actually see what the problem is?

[UPDATE2]
So when I delete the \Documents\Arduino\libraries folder it runs once after that and it runs ok. If I close and open that IDE after that it comes bask to the old problem and I have to delete the folder again so it can work .Very weird!

[SOLUTION] I had Sierra Wireless Application Interface on Com4. I was not using it, it's just a driver for the Sierra Wireless I had before. After disabling it it all works smoothly. So any Com ports can cause some issues, in my case was this one.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: prathameshkakade on Jul 21, 2013, 11:52 am
Thanks man.It worked out perfect.But I am getting another error.Serial port already in use.Any working methods to fix it?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: prathameshkakade on Jul 21, 2013, 11:56 am
One more problem is my tools option does not work properly.I have to click on tools and wait for 2-3 minutes for tools dropdown menu to appear.Any suggestions?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: archypyd on Aug 03, 2013, 11:16 am
hi world,

i have the same troubble can you help me, it doesn't get out.. i have try all i can.

that is the result of the debug.

CmdLine:   C:\Users\archypyd\Documents\Arduino\arduino-1.0.5\arduino.exe --l4j-debug
WOW64:      no
Working dir:   C:\Users\archypyd\Documents\Arduino\arduino-1.0.5\.
Bundled JRE:   java
Check launcher:   C:\Users\archypyd\Documents\Arduino\arduino-1.0.5\java\bin\javaw.exe (OK)
Add classpath:   lib\pde.jar
Add classpath:   lib\core.jar
Add classpath:   lib\jna.jar
Add classpath:   lib\ecj.jar
Add classpath:   lib\RXTXcomm.jar
Launcher:   C:\Users\archypyd\Documents\Arduino\arduino-1.0.5\java\bin\javaw.exe
Launcher args:   -Xms128m -Xmx128m -classpath "lib;C:\Users\archypyd\Documents\Arduino\arduino-1.0.5\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar" processing.app.Base
Args length:   189/32768 chars

thanks you for your time.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Youraagh on Sep 10, 2013, 01:02 am
I used to get this error. If I make sure the Arduino device is plugged into my PC, before I start the software, it goes away...
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: markgryzwa on Sep 15, 2013, 03:11 am
I'm having the same problem.  Tried all the tips and tricks in the forum but no luck.  Here's the logfile

CmdLine:   C:\Program Files (x86)\Arduino\arduino.exe --l4j-debug
WOW64:      yes
Working dir:   C:\Program Files (x86)\Arduino\.
Bundled JRE:   java
Check launcher:   C:\Program Files (x86)\Arduino\java\bin\javaw.exe (OK)
Add classpath:   lib\pde.jar
Add classpath:   lib\core.jar
Add classpath:   lib\jna.jar
Add classpath:   lib\ecj.jar
Add classpath:   lib\RXTXcomm.jar
Add classpath:   lib\commons-codec-1.7.jar
Add classpath:   lib\commons-exec-1.1.jar
Add classpath:   lib\commons-httpclient-3.1.jar
Add classpath:   lib\commons-logging-1.0.4.jar
Add classpath:   lib\jmdns-3.4.1.jar
Add classpath:   lib\jsch-0.1.50.jar
Launcher:   C:\Program Files (x86)\Arduino\java\bin\javaw.exe
Launcher args:   -Xms128m -Xmx128m -classpath "lib;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar;lib\commons-codec-1.7.jar;lib\commons-exec-1.1.jar;lib\commons-httpclient-3.1.jar;lib\commons-logging-1.0.4.jar;lib\jmdns-3.4.1.jar;lib\jsch-0.1.50.jar" processing.app.Base
Args length:   272/32768 chars
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: markgryzwa on Sep 17, 2013, 04:28 pm
The only way I can get the new Arduino.exe to run is to Right Click and choose Run as Administrator.  Then it seems to function well.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: smokin_cannon on Sep 20, 2013, 07:18 pm
per http://www.ultratechnet.com/2013/01/arduino-problem-invalid-window-handle.html (http://www.ultratechnet.com/2013/01/arduino-problem-invalid-window-handle.html)

"SOLUTION:
All you have to do is rename/delete(whatever you prefer) the "java" folder in the Arduino package and copy-paste the java runtime environment located in the program files folder. This is pretty simple hack which came to my mind while just trying to fix the problem. I hope this "technique" works with you.

Active Bluetooth device also seemed to be a probable cause for the problem, also responsible for slow behavior of the arduino IDE. Turn off the bluetooth device of your laptop, i.e disable the network and try again launching the application."

Worked for me.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Serjfrog on Oct 22, 2013, 07:44 am
I unintalled java and the bluetooth program and it fix the problem

I don't know why but I note that the problem begun when an update for java was installed, that is why I decided to uninstall java.

:|
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: feralbeagle on Nov 03, 2013, 10:21 pm
I am also seeing the same Launch4j error and it is happening on two different machines. I noticed that I only see it the first time I launch the Arduino IDE. Subsequent launches of the IDE do not give an error until I reboot, then I get an error again.

I just loaded version 1.5.4-r2 of the IDE. It asks for java permissions at launch. It does not give an error. I did nothing else to the java environment. It work on an old machine running xp and a windows 7 machine.

Do you get the same results?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: RS_BadCop on Nov 05, 2013, 08:49 am
Same Problem here.

Windows7 Professional x64
PC without BT

new install or deleting files not working
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: omdaddi on Nov 07, 2013, 06:02 pm
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

http://arduino.cc/en/Guide/Windows#toc2

When I ran arduino.exe I was asked for java permissions and it all seems to work now.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Youraagh on Feb 13, 2014, 05:29 am
Anti virus software can block Java, disable it temporarily.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: naveen2k5 on Jun 22, 2014, 12:17 pm
Look for the Bluetooth icon in the right of the window taskbar.  Right click on it and click on turn OFF bluetooth adaptor. 8)
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: ChrisPSR on Jun 22, 2014, 01:48 pm

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.

ChrisPSR
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: cwcarver on Aug 22, 2014, 06:47 pm
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.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Nidhin_K on Sep 24, 2014, 06:43 am
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
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: sachbearbeiter on Oct 03, 2014, 10:45 pm
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.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: kapomony on Oct 29, 2014, 05:18 pm
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)

bye
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: ardutech on Nov 30, 2014, 08:49 am
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.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: slinkie on Jan 15, 2015, 11:50 pm
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.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: vimal_dubey on Jan 19, 2015, 10:38 am
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...
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: jknutter on Jan 22, 2015, 12:34 am
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.   
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: ulmis on Feb 01, 2015, 05:25 pm
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         <DIR>    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.)

(https://db.tt/WaeVGJUb)


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?  



Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: chfakht on Feb 05, 2015, 08:45 pm
@jknutter :  in the subfolder Libraries , i have not found any subfolders called Libraries nested off each other.

SO  WHAT IS THE SOLUTION !!!
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: paul-y on Feb 12, 2015, 04:24 am
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.     
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Feb 12, 2015, 01:32 pm
paul-y have you already tried latest 1.6.0?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: SarahN on Feb 12, 2015, 06:46 pm
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/ (https://deepremove.codeplex.com/). Thought it might be useful to someone else.

Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: paul-y on Feb 13, 2015, 08:46 pm
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!

     
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: CrossRoads on Feb 13, 2015, 08:49 pm
Quote
looks like all my work is lost!
Why? Did you delete all your .ino files? If not, they are not lost.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: paul-y on Feb 15, 2015, 04:12 am
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?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: CrossRoads on Feb 15, 2015, 05:28 am
Keep plugging away, you'll get the IDE to start eventually.
I've not had issues like yours, on either an older WinVista machine, or my current Win7Pro machine, don't have much to offer to overcome it.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Feb 16, 2015, 10:25 am
paul-y, please try the following

Open command prompt and "cd" into the arduino ide folder (probably something like C:\Program Files (x86)\Arduino

Then type arduino_debug

If the IDE won't open, you should at least see lot's of stuff being printed on the command prompt. Please copy paste of that stuff here
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: paul-y on Feb 17, 2015, 12:51 am
Thank you Federico.

I am not a computer guy, most of this stuff is beyond my ability. what is "cd"? what does it mean?

I have never used the command prompt before. if I get in there can I mess up my computer? should I risk playing around in there? and if I happen to get that far in there I don't know if I will be able to copy and paste the info back here.

Thanks Paul.

 
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Feb 17, 2015, 08:24 am
paul-y then it's best if you ask some friend a hand on this. once you know what prompt is and how it works, it's super easy, but if you don't know it, you can mess up things a lot
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: kfeger on Mar 02, 2015, 09:35 pm
Hi Frederico,
I did what you asked, starting arduino_debug.exe from the command line. It took on my Laptop about 2 minutes to start, but it started (Win7-64, quad core i7, 8Gb, SSD). While loading, the command Windows showed no Output whatoever.
That seems to me quite a long loading time and is is repeatable.

Sometimes I get the "launch4j"-error also and I don't have a Clou.
The Problem started definitely with 1.6.0. I have a Standard Arduino Installation and also Java-JRE installed. Renaming the original Java or the Arduino supplied Java doesn't make a difference.

Any hint?
Regards
karl
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Mar 03, 2015, 08:55 am
We've recently fixed a windows+launch4j+java issue. It will be released with 1.6.1 but it's already available as a nightly build http://arduino.cc/en/Main/Software#nightly
Try giving it a spin
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: kfeger on Mar 07, 2015, 04:31 pm
I updated to 1.6.1
The lanch4j-error is still there.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Mar 07, 2015, 07:11 pm
Can you run it from the command line using arduino_debug.exe and paste the error message here?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Michael_QLD_AU on Mar 08, 2015, 01:44 am
G'Day All

Go here and try this. No more error LaunchJ4.

https://alselectro.wordpress.com/2014/01/26/arduinosolution-to-launch4j-problem/

Hope this helps

Michael
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Mar 08, 2015, 07:50 pm
We have updated bundled java as alselectro did. It's available in the latest nightly and will be part of 1.6.1 http://arduino.cc/en/Main/Software#nightly
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: menxin on Mar 13, 2015, 04:26 am
When I run arduino_debug.exe in cmd,it report a exception :jnidispatch(....jna/win32-amd64/...) not found in resource path. I locate jna.jar,the path(win32-amd64) not found.So I download the newest version jna.4.0.1.jar and replace lib/jna.jar,the exception has disappeared.

Run arduino.exe ,the dialog is not come,But the IDE is not opened.No exceptions no Logs and no IDE,only a splash form.


Windows 8.1 pro X64


On my other computers,use the same old jna.jar,also in Windows 8.1 pro X64, was all right.....
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: menxin on Mar 13, 2015, 04:28 am
IDE 1.6.0 and 1.6.1 have the same problem..
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: menxin on Mar 13, 2015, 06:53 am
[solved]

1.Update jna.jar (https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar) to newest version.

2.Download astyle (http://sourceforge.net/projects/astyle/files/latest/download?source=files) source code,compile it with X64 profile.

3.Install vcredist_x64.exe to support your new astylej.dll (X64).


My problem is java X86 cant run in my windows pro 8.1 WOW64,so i have to install java X64,becasue arduino IDE is 32bit,and some of its lib is 32bit,cant run in x64 env. So replace 32bit lib to 64bit version can solve this problem.

Wish arduino can publish 64bit IDE.....
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Mar 13, 2015, 08:18 am
menxin this is news to me: thought windows could run 32 bit binaries with no issues. We'll schedule the release of a 64 bit windows ide
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Mar 13, 2015, 08:19 am
Your issue is being tracked here https://github.com/arduino/Arduino/issues/2763
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: pjrc on Mar 13, 2015, 09:42 am
Exactly which version of Windows is this?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Mar 13, 2015, 09:44 am
A windows pro 8.1 WOW64
What's even more strange is that even the toolchain is 32bit, so the IDE should not even compile a sketch
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Flight_Jockey on Mar 17, 2015, 07:23 pm
@jknutter :  in the subfolder Libraries , i have not found any subfolders called Libraries nested off each other.

SO  WHAT IS THE SOLUTION !!!
I don't know if this has been the case for others, but what appears to have led to my 44 deep nested libraries folder (before I caught it, it probably would have continued), 18GB in size, was that I inadvertently attempted to Import Library/Add Library on the root library folder.  What a mess! 

I'm not even going to try to replicate this mess.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Garvord on Mar 19, 2015, 03:01 pm
per http://www.ultratechnet.com/2013/01/arduino-problem-invalid-window-handle.html (http://www.ultratechnet.com/2013/01/arduino-problem-invalid-window-handle.html)

"SOLUTION:
All you have to do is rename/delete(whatever you prefer) the "java" folder in the Arduino package and copy-paste the java runtime environment located in the program files folder. This is pretty simple hack which came to my mind while just trying to fix the problem. I hope this "technique" works with you.

Active Bluetooth device also seemed to be a probable cause for the problem, also responsible for slow behavior of the arduino IDE. Turn off the bluetooth device of your laptop, i.e disable the network and try again launching the application."

Worked for me.
Yes. This worked for me:-)

How-To:
1. Goto to your Arduino install directory and rename the C:\Program Files (x86)\Arduino\"java" folder to "java.bak".
2. Copy the java folder (C:\Program Files (x86)\Java\jre7) to your Arduino install directory (C:\Program Files (x86)\Arduino\jre7) and rename it to C:\Program Files (x86)\Arduino\"java".


Windows 8.1 Enterprise 64bit
Arduino IDE 1.6.1
Java SE Runetime Environment 7
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Mar 19, 2015, 03:56 pm
2 years old and should be fixed with 1.6.1. Can you please run arduino_debug from the command prompt and past the output?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Juhizo on Mar 19, 2015, 07:19 pm
Exactly same problem here with 1.6.x
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: pascalgre on Mar 28, 2015, 10:51 am
Bonjour à tous ... problème au démarrage de arduino suite à des chargement de nouvelle librairies. Arduino 1.6 . lors du lancement du programme j'ai eu un temps assez long d'attente puis le msg "en error occured while.."
Je me suis rendu compte que dans le dossier où sont rangé les sketch :
bibliothèque\Documents\Arduino   Le dossier arduino était rempli de sous dossier "librairie\librairie\librairie..." j'ai donc renommé le dossier Arduino qui contient tous ces dossiers en "Arduino1" et j'ai recréé un autre dossier Arduino dans Documents et tout fonctionne.

Si ça peut aider :)
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: mib1001 on Mar 30, 2015, 08:47 pm
I have problem: Arduino IDE v.1.6.1 (and v.1.6.2) not start! My OS - Windows 8.1 Pro 64-bit.

But solution very easy:
- install Java Update 7 55 - jdk-7u55-windows-i586 (i586 - for 32bit)
- rename folder "C:\Program Files (x86)\Arduino\java" -> "C:\Program Files (x86)\Arduino\java-OLD"
- create folder "C:\Program Files (x86)\Arduino\java" again
- copy all files from "C:\Program Files (x86)\Java\jre7" to "C:\Program Files (x86)\Arduino\java"
- rename file "C:\Program Files (x86)\Arduino\lib\jna.jar" - > "C:\Program Files (x86)\Arduino\lib\jna-OLD.jar"
- copy file "jna-4.1.0.jar" (view previous pages this forum) to folder "C:\Program Files (x86)\Arduino\lib" and rename to "jna.jar"

That's all!

After this manupations Arduino IDE v.1.6.2 will start successfully!
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: unicoi on Mar 31, 2015, 10:03 am
Not sure how it happened, but the Arduino IDE I just installed created over 5000 "libraries" folders on my pc, and the IDE stopped launching after that.
Many, many thanks to SarahN in this thread for suggesting the DeepRemove utility. It's the only one that was able to get rid of those 5000+ empty folders on my pc.
I tried Robocopy, but it didn't work, and my virus checking software warned me not to download the unlocker tool that someone else mentioned.

I spent the last 4 hours trying to get rid of those files, so thanks again SarahN!

So, Arduino developers, when are we going to get an updated IDE that fixes this issue?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: brillo on Apr 08, 2015, 05:12 am
Here's what worked for me. on my Windows 8 64 bit Dell Tower
I opened Windows Power Shell and navigated to the Program Files (x86)/arduino folder and executed the arduino_debug.exe program and got this message  Exception in thread "main" java.lang.RuntimeException: Couldn't create a writer for C:\Users\Jim\AppData\Roaming\Arduino
15\preferences.txt

so, I navigated to C:\Users\Jim\AppData\Roaming\Arduino 15\preferences.txt file and deleted it.

When I ran the arduino program it opened normally and quickly and it created a new preferences file.  All is good at this point - so far :^)
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: brillo on Apr 08, 2015, 05:19 am
Here's what worked for me. on my Windows 8 64 bit Dell Tower
I opened Windows Power Shell and navigated to the Program Files (x86)/arduino folder and executed the arduino_debug.exe program and got this message  Exception in thread "main" java.lang.RuntimeException: Couldn't create a writer for C:\Users\Jim\AppData\Roaming\Arduino
15\preferences.txt

so, I navigated to C:\Users\Jim\AppData\Roaming\Arduino 15\preferences.txt file and deleted it.

When I ran the arduino program it opened normally and quickly and it created a new preferences file.  All is good at this point - so far :^)

I wish I was what I was when I wished I was what I am Now
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: brillo on Apr 08, 2015, 05:23 am
btw - I have 1.6.1 installed. When I previously had 1.6.2 installed, the splash screen would show up and disappear in a manner of seconds. So, I uninstalled it an made sure all directories were gone - had to delete some. Then installed 1.6.1 and then the splash screen would stay up a long time then the error message popped up.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Apr 08, 2015, 07:51 am
brillo, have you already tried installing 1.6.3?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: brillo on Apr 08, 2015, 10:19 am
No. I am working with the Teensy board (https://www.pjrc.com/teensy/) which hasn't been tested on 1.6.2 yet. I only tried 1.6.2 because I was having trouble loading 1.6.1. So, I don't plan to try 1.6.3 unless I have a good reason to do so.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: brillo on Apr 08, 2015, 10:19 am
No. I am working with the Teensy board (https://www.pjrc.com/teensy/) which hasn't been tested on 1.6.2 yet. I only tried 1.6.2 because I was having trouble loading 1.6.1. So, I don't plan to try 1.6.3 unless I have a good reason to do so.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: jAssing on Apr 12, 2015, 07:24 pm
fwiw: this started to happen for me too after updating to 1.6.1... It displays the dialog but then opens the ide.
I have tried the various fixes posted, nothing seems to work.  I tried last nights "nightly-build" and noticed a new splash screen... No error dialog, but no IDE either. Rolled back... (but error dialog still appears).
The debug log looks similar to others that have posted.
Code: [Select]


CmdLine: C:\Program Files (x86)\Arduino\arduino.exe --l4j-debug
WOW64: yes
Working dir: C:\Program Files (x86)\Arduino\.
Bundled JRE: java
Check launcher: C:\Program Files (x86)\Arduino\java\bin\javaw.exe (OK)
Add classpath: lib\arduino-core.jar
Add classpath: lib\pde.jar
Add classpath: lib\jna.jar
Add classpath: lib\ecj.jar
Add classpath: lib\jssc-2.8.0.jar
Add classpath: lib\commons-codec-1.7.jar
Add classpath: lib\commons-exec-1.1.jar
Add classpath: lib\commons-httpclient-3.1.jar
Add classpath: lib\commons-logging-1.0.4.jar
Add classpath: lib\jmdns-3.4.1.jar
Add classpath: lib\jsch-0.1.50.jar
Launcher: C:\Program Files (x86)\Arduino\java\bin\javaw.exe
Launcher args: -Xms128M -Xmx1024M -classpath "lib;lib\arduino-core.jar;lib\pde.jar;lib\jna.jar;lib\ecj.jar;lib\jssc-2.8.0.jar;lib\commons-codec-1.7.jar;lib\commons-exec-1.1.jar;lib\commons-httpclient-3.1.jar;lib\commons-logging-1.0.4.jar;lib\jmdns-3.4.1.jar;lib\jsch-0.1.50.jar" processing.app.Base
Args length: 283/32768 chars
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Apr 12, 2015, 07:46 pm
Please try starting the IDE using arduino_debug from a command prompt. It will print an error message: please paste it here
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: jAssing on Apr 13, 2015, 07:26 am
Will dig into it deeper tomorrow -- but a quick run -- using arduino_debug.exe, no error dialog appears; using arduino.exe it does.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: jAssing on Apr 22, 2015, 10:55 pm
It was complaining about a few libraries.  After I cleaned up the old libraries, now both arduino.exe and arduino_debug.exe fail to load the IDE.

Arduino.exe still pops up the generic message about failure to launch application.
arduino_debug.exe now is complaining about a java file..

Code: [Select]

Exception in thread "main" java.lang.UnsatisfiedLinkError: jnidispatch (/com/sun/jna/win32-amd64/jnidispatch.dll) not found in resource path
        at com.sun.jna.Native.loadNativeLibrary(Native.java:471)
        at com.sun.jna.Native.<clinit>(Native.java:91)
        at processing.app.windows.Platform.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at processing.app.BaseNoGui.initPlatform(Unknown Source)
        at processing.app.Base.initPlatform(Base.java:177)
        at processing.app.Base.main(Base.java:91)
^C

The file (jnidispatch.dll) is not found anywhere on my system.  I re-installed java w/o any difference.
Note; when running the debug it hangs at the last statement (I left it for over an hour) and ctrl-c breaks it.
after running either arduino.exe (but not arduino_debug.exe) -- javaw.exe is left running in memory.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: qlenfg on May 04, 2015, 10:14 pm
I've been dealing with the same issue -- at some point, when I upgraded the IDE, it quit working with the Java error. This was on a networked PC with the normal user folders residing on a network drive, rather than on the local PC.

I tried a few things and blew off the issue, since I had a Linux PC to work with. I picked up the issue again today, and re-read this thread, which had a few more suggestions. Today I upgraded the JRE to the latest (8.0_45) and downloaded the latest hourly build of the Arduino IDE (1.6.4).

After unzipping the Arduino folder, I ran the .exe file, and behold, the IDE now runs and gives me the edit window. I haven't tried uploading any code to the Arduino yet, but it should work.
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: instalator on May 10, 2015, 06:25 pm
Удалите папку c:\Users\......\Documents\Arduino\ и все будет ОК!
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: lestofante on May 10, 2015, 08:12 pm
english?
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Mysticforce on Jul 10, 2015, 05:55 am
I have tried removing arduino from my documents.  I have tried the deep scan to see if there was any directory problems and no luck there.  I tried the new java and copied that over to the arduino folder and still it will not run.  I was running just fine and then literally the next day I turned on my laptop and it stops working.  I uninstalled it and install that new one 1.6.5.1 and still won't start.  Please someone help.  I have so much work put into this and I am at my wits end.  I am running winblowz 8.1 with all updates.  Also turned off bluetooth and wifi.  Only connected via lan.  Arduino will not startup please help. Here is the report from arduino debug:

C:\Program Files (x86)\Arduino>arduino_debug.exe
Loading configuration...
java.lang.ArrayIndexOutOfBoundsException: 3
        at processing.app.windows.RegQueryParser.parse(RegQueryParser.java:29)
        at processing.app.windows.RegQueryParser.<init>(RegQueryParser.java:14)
        at processing.app.windows.Platform.getFolderPathFromRegistry(Platform.ja
va:71)
        at processing.app.windows.Platform.recoverDefaultSketchbookFolder(Platfo
rm.java:60)
        at processing.app.windows.Platform.init(Platform.java:51)
        at processing.app.Base.guardedMain(Base.java:153)
        at processing.app.Base.main(Base.java:137)

C:\Program Files (x86)\Arduino>
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: saharmohamedali on Jul 10, 2015, 09:30 am
Nothing obvious in the log.

Do you have bluetooth? Disable bluetooth and see if that helps. Sometimes that will cause a long delay and will cause the app to timeout.

Also, try moving the Arduino folder from the Desktop.


(http://imgupp.com/img/1433173618.jpg) (http://imgupp.com/1433173618.html)
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: federicofissore on Jul 10, 2015, 12:25 pm
Mysticforce it's a bug we fixed in the hourly builds and that will be included into 1.6.6
Please try using the hourly http://www.arduino.cc/en/Main/Software#hourly (http://www.arduino.cc/en/Main/Software#hourly)
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: gparvind on Sep 19, 2015, 04:23 am
All you have to do is rename/delete(whatever you prefer) the "java" folder in the Arduino package and copy-paste the java runtime environment located in the program files folder. This is pretty simple hack which came to my mind while just trying to fix the problem. I hope this "technique" works with you.

I had jdk/jre8 installed and built arduino from source. But while launching arduino, I was getting this error: AStylej.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

Replaced the java folder in arduino folder with correct jre and it worked :)
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: giantkiller on Nov 03, 2015, 05:17 pm
Nightly Release 1.6.6 worked for me only the first time. Second launch reverted back to closing splash screen then nothing.
So...
c:\Program Files (x86)\Arduino>arduino_debug.exe
Loading configuration...
Initializing packages...
Preparing boards...
Starting...
java.lang.NullPointerException
        at processing.app.Theme.getStyledFont(Theme.java:150)
        at processing.app.syntax.SketchTextArea.setSyntaxTheme(SketchTextArea.ja
va:149)
        at processing.app.syntax.SketchTextArea.setTheme(SketchTextArea.java:120
)
        at processing.app.syntax.SketchTextArea.installFeatures(SketchTextArea.j
ava:90)
        at processing.app.syntax.SketchTextArea.<init>(SketchTextArea.java:81)
        at processing.app.Editor.createTextArea(Editor.java:1027)
        at processing.app.Editor.<init>(Editor.java:271)
        at processing.app.Base.handleOpen(Base.java:875)
        at processing.app.Base.handleOpen(Base.java:860)
        at processing.app.Base.handleOpen(Base.java:856)
        at processing.app.Base.handleNew(Base.java:751)
        at processing.app.Base.<init>(Base.java:455)
        at processing.app.Base.guardedMain(Base.java:219)
        at processing.app.Base.main(Base.java:135)

c:\Program Files (x86)\Arduino>

In my case I had modified theme.txt. My version was shorter and missing some items that 1.6.6 was looking for. Replaced with the the zip theme file and viola. It worked.

Could Arduino please have color selections for tabs, and fonts in the preferences? This would make the interface so much more visible.
And thank you for fixing the sketch tab selection list window!
Title: Re: [HELP] Launch4j - An error occurred while starting the application.
Post by: Mohamedkhemeri on May 23, 2016, 11:37 pm
Do any of you send me please < MyBigFont.h> form zip