Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: UMTS on Mar 04, 2012, 06:23 pm

Title: Launch4j error - IDE won't start - Please HELP!!
Post by: UMTS on Mar 04, 2012, 06:23 pm
Hi,

I have recently installed Arduino 1 IDE and have encountered a problem that is now preventing this and any previous versions (0022 and 0018) for example from starting.

What happens is you launch the IDE and the splash screen appears instantly and remains on the screen for some considerable time (approx 40 seconds).

The splash screen then disappears and is replaced by a dialogue box 'Launch4j' saying "An error occurred while starting the application." and the only option os to click 'OK'. - attached

All was working fine up till about 2 weeks ago and I have trawled high an low across the web to see if there is a fix, but nothing has corrected this.

Please can anyone help, as I'm totally stuck and desperately want to move on developing with this fantastic platform.

ps. I'm running Windows 7 64 bit SP1 on a i5 3.20GHz with 8GB of RAM if it helps.

Many Thanks

Steve>>>
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: johnwasser on Mar 04, 2012, 07:04 pm
Make sure you have the latest Java installation.
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Louis Davis on Mar 04, 2012, 07:47 pm
Another experiment to try is to delete your preferences.text file that can be found in the following location, depending on what version of Windows you have.

c:\Documents and Settings\<USERNAME>\Application Data\Arduino\preferences.txt (Windows XP)
c:\Users\<USERNAME>\AppData\Roaming\Arduino\preferences.txt (Windows Vista\Windows 7)

There has been some indication that a corrupt preferences.txt file can prevent the IDE from launching.

If that does not work, from a command line, launch arduino.exe with the following command:

arduino.exe --l4j-debug

Then send us the launch4j.log file in the Arduino folder to see if that tells us anything.
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: UMTS on Mar 04, 2012, 08:21 pm
Hi,

Thanks John and Louis for your quick help.

Louis - your were spot on - deleting the preferences.txt worked a treat.


THANKYOU BOTH VERY MUCH - REALLY APPRECIATED!!!

Best Regards

Steve....
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: mike1948 on Mar 09, 2012, 01:06 am
I am having the same problem.

I deleted the preferences.txt file but it had no effect.

I ran the launch4j with the debug turned on, following is the log file contents.

---------------------------------------------------------

CmdLine:   C:\Users\Mike\Downloads\arduino-1.0-windows\arduino-1.0\arduino.exe --l4j-debug
WOW64:      no
Working dir:   C:\Users\Mike\Downloads\arduino-1.0-windows\arduino-1.0\.
Bundled JRE:   java
Check launcher:   C:\Users\Mike\Downloads\arduino-1.0-windows\arduino-1.0\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\Mike\Downloads\arduino-1.0-windows\arduino-1.0\java\bin\javaw.exe
Launcher args:   -Xms128m -Xmx128m -classpath "lib;C:\Users\Mike\Downloads\arduino-1.0-windows\arduino-1.0\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar" processing.app.Base
Args length:   195/32768 chars
Exit code:   1
--------------------------------------------------------------------------------------------------

Does this give you any clues?


Thanks for any help you can provide.

Mike

Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: pangzi888 on Mar 09, 2012, 09:41 am
(http://www.keke23.info/gala.gif)
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Louis Davis on Mar 09, 2012, 05:37 pm
Are you able to launch the IDE by entering the following command from a command line?

C:\Users\Mike\Downloads\arduino-1.0-windows\arduino-1.0\java\bin\javaw.exe -Xms128m -Xmx128m -classpath "lib;C:\Users\Mike\Downloads\arduino-1.0-windows\arduino-1.0\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar" processing.app.Base

If not, use the following command and reply with the output.txt file that is created:

C:\Users\Mike\Downloads\arduino-1.0-windows\arduino-1.0\java\bin\java.exe -verbose -Xms128m -Xmx128m -classpath "lib;C:\Users\Mike\Downloads\arduino-1.0-windows\arduino-1.0\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar" processing.app.Base > output.txt
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: mike1948 on Mar 10, 2012, 01:00 am
I tried to enter the first command as you suggested but I could not get an IDE.
I tried the second command and a window came up with data but it closed as soon as it opened.
I could not capture the contents.
I am using "Run" from the accessories folder and it will not take the whole command, it leaves out the "processing.app.Base>output.txt" portion.
I tried using the command prompt and typing in the whole second command but nothing happened at all.
Where would I expect to find the output.txt file?
Is there a way of capturing the window that pops up?

I am new at this.
Thanks for your help.
Mike
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Louis Davis on Mar 10, 2012, 07:09 am
You should be entering these commands from a command prompt.
The output.txt will be in the folder that you executed the command from.

The > output.txt at the end of the command will redirect all the output to this file rather than to the screen. This will make it easier to capture the output and post it here.

If you want to see if the command is executing anything, you can run the second command and leave off the > output.txt. You should see quite a bit of information show up in the command window.
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: mike1948 on Mar 10, 2012, 07:27 pm
I did as you suggested and got an output file which I have attached.
Its quite big at 31K bytes.

Hope this helps.

Thanks again.

Mike
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Louis Davis on Mar 10, 2012, 09:43 pm
Unfortunately, the output.txt file does not indicate the problem.
The output.txt shows that java just stops loading the application fairly early in the loading process, but does not show any errors.

As an example, my output.txt on my system is about 169K.

Did this ever work on your system? If so, what types of things have you done to the system before it stopped working?
Software installs? Driver installs? Windows updates? Etc...
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: mike1948 on Mar 10, 2012, 11:50 pm
The program did work on this system several months ago but all sorts of window updates and such have occurred since then. 
Do I need to be administrator to run this program?
Do I need to load the latest java updates?
Is there another way of invoking the executable? Batch?

Thanks again
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Louis Davis on Mar 11, 2012, 01:04 am

Do I need to be administrator to run this program?

No you don't need to be an admin to run it, but that would be an interesting experiment.

Quote

Do I need to load the latest java updates?

Normally this is not required, because the IDE contains it's own copy of the Java runtime. It may be worth a try to see if this changes anything.

Quote

Is there another way of invoking the executable? Batch?

You have already tried the only alternative way to invoke the IDE.  The arduino.exe is just a wrapper to launch the Arduino IDE, which is a Java application. By executing that long command line I had you run for debug purposes, you were basically doing what the arduino.exe was doing.

So, try running as admin first, to see if this changes the behavior.
Then trying updating Java.
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: mike1948 on Mar 11, 2012, 07:20 pm
I ran as administrator and the IDE loaded up.
I ran a sketch and it compiled it.

Thanks Louis for all your help.

Mike
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Luse on Mar 15, 2012, 08:15 pm
I.m sorry if this is such a noob question but i got my first arduino uno got the drivers to work and my laptop (running windows 7 ultimate) can see the arduino but i downloaded the arduino-1.0-windows ide and i cannot get it to start, all i get is a splash screen for a few seconds and thats it. i have no idea what to do next i dont even get any error messages i've even tried running as administrator but same thing any info or help pointing me in  the right direction would be greatly appreciated thank you all who take the time to respond,
           Sincerly Richard
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Louis Davis on Mar 15, 2012, 08:44 pm
From a command line, launch arduino.exe with the following command:

arduino.exe --l4j-debug

Then send us the launch4j.log file in the Arduino folder to see if that tells us anything.
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: newbiehacker on May 08, 2012, 09:57 pm
I seem to be having the same issue.  I just installed Arduino on my Win7 PC into the C:/ directory. When I double click on the Arduio icon, the Blue intro screen shows up and then disappears, but does not open the program.  I tried everything in this thread.  I attached my log file.  Any ideas?

Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: grego on Jul 06, 2012, 12:37 am
Hello,
I've a same issue. I tryed all but application doesn't start. Anybody help me?
Kind regards,
Grzegorz
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Louis Davis on Jul 06, 2012, 12:44 am
Take a look at this thread, this may help:
http://arduino.cc/forum/index.php/topic,108715.msg818605.html#msg818605 (http://arduino.cc/forum/index.php/topic,108715.msg818605.html#msg818605)
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: chickenzzz on Jul 16, 2012, 03:18 pm
I sloved this problem by coping the rxtxSerial.dll to the "c:\windows" directory. I'm using arduino in win7 64bit.
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Cbenson on Aug 16, 2012, 05:23 pm
Deleting the preferences file worked for me after everything else failed.

c:\Users\<USERNAME>\AppData\Roaming\Arduino\preferences.txt (Windows Vista\Windows 7)

- Arduino failed to launch, waited a minute, launch 4j error appeared
- Disabled bluetooth (no WiFi installed)
- Uninstalled V1.0 and tried with previous version - same error
- Uninstalled Java, tried again
- Multiple javaw.exe appearing in processes
- Renamed / deleted the Arduino folder under <user>
- Looked through the log to see where the program was hanging (no success)
- added EN to the profile (was empty before); can't even remember where I found that idea...
- Replaced rxtxSerial.dll file

... finally deleted the preferences file and all seems to be ok.
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: James46 on Mar 15, 2013, 01:22 am
Hi,

I've just taken delivery of a DUE (This is my first time with Arduino)

I'm experiencing a problem similar to this thread with the IDE showing the splash screen momentarily on start up and then closing.

I've done virtually everything suggested in this thread and am lost for any other clues.

Summary:
- Win7 64 bit
- Downloaded IDE 1.5.2 (Never had Arduino installed previously)
- Installed Com port drivers successfully, with DUE connected by USB to programming port.
- Double click Arduino.exe in extracted files directory
- PROBLEM - The splash screen shows for few seconds and closes.

Attempted remedies;
1. Extracted IDE v1.5.2 to a shorter path directory - Problem still exists
2. Tried manually setting com port number to com1, com2 (Was something hi like com19 ) - Problem still exists
3. Tried deleting the preferences.txt file - Problem still exists
4. Updated Java 32 bit and Java 64 bit - Problem still exists
5. Tried executing Arduino.exe as administrator  - Problem still exists
6. Tried installing and executing from a different account on same PC   - Problem still exists
7. Tried IDE V1.0.4 - Problem still exists
8. Tried IDE  "arduino-0023". This loads and seems to work
9. Exexuted from command line with "arduino.exe --l4j-debug" - Problem still exists with output below.

Has anyone else experinced this or know of a solution? Perhaps there's something I've missed




CmdLine:   C:\Arduino\arduino-1.5.2-windows\arduino-1.5.2\arduino.exe --l4j-debug
WOW64:      yes
Working dir:   C:\Arduino\arduino-1.5.2-windows\arduino-1.5.2\.
Bundled JRE:   java
Check launcher:   C:\Arduino\arduino-1.5.2-windows\arduino-1.5.2\java\bin\javaw.exe (n/a)
64-bit search:   SOFTWARE\JavaSoft\Java Runtime Environment...
Match:      SOFTWARE\JavaSoft\Java Runtime Environment\1.7
Match:      SOFTWARE\JavaSoft\Java Runtime Environment\1.7.0_17
Using 64-bit runtime.
64-bit search:   SOFTWARE\JavaSoft\Java Development Kit...
32-bit search:   SOFTWARE\JavaSoft\Java Development Kit...
Check launcher:   C:\Program Files\Java\jre7\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:\Program Files\Java\jre7\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
Exit code:   1



Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: Louis Davis on Mar 15, 2013, 03:27 am
The launch4j log indicates the IDE is trying to use the 64 bit version of Java.

The IDE is not 64 bit compatible and requires 32 bit Java.

The log also indicates it is not able to locate the version of Java that is bundled with the IDE.
Can you verify that the Java directory is located at the location in the log file:
Check launcher:   C:\Arduino\arduino-1.5.2-windows\arduino-1.5.2\java\bin\javaw.exe (n/a)
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: James46 on Mar 20, 2013, 03:58 am
Thanks heaps Louis

You are right. Java wasn't present in the directory, as for some reason it hadn't unzipped properly.

I performed another extract of the package and works fine now.

cheers.
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: ardu2267 on Mar 24, 2013, 10:23 pm
I have the same launch4j-problem. Deleting preferences.txt etc. didn`t help.   =(

I'm using win 7 64

Here is the launch4j.log file:

CmdLine:   C:\arduino-1.0.4-windows\arduino-1.0.4\arduino.exe --l4j-debug
WOW64:      yes
Working dir:   C:\arduino-1.0.4-windows\arduino-1.0.4\.
Bundled JRE:   java
Check launcher:   C:\arduino-1.0.4-windows\arduino-1.0.4\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:\arduino-1.0.4-windows\arduino-1.0.4\java\bin\javaw.exe
Launcher args:   -Xms128m -Xmx128m -classpath "lib;C:\arduino-1.0.4-windows\arduino-1.0.4\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar" processing.app.Base
Args length:   178/32768 chars

I don't understand this, does anyone?
Title: Re: Launch4j error - IDE won't start - Please HELP!!
Post by: nightcrawler218 on Mar 25, 2013, 01:02 am
I am having the same issue. Any help, anyone.?

Thanks in advance.