What does mean by Launch4j error?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: What does mean by Launch4j error?

Post by adafruit_support_bill »

@user0307 - Can you tell us a little more about your system? What OS? What version of the Arduino IDE?

user0307
 
Posts: 8
Joined: Wed Jul 03, 2013 6:07 pm

Launch4j error

Post by user0307 »

First, please understand that I have been using the Arduino IDE for a couple of weeks without any problems.
So this is not a set-up/install issue (unless this software is known to interfere with itself).
This is a "it's just stopped working for no good reason" issue.

I'm running Vista 32-bit with all the latest MS updates (some very recent).
I've got no bluetooth or wireless adaptors.
I'm trying to load Blink (or anything) on to a Leonardo.
Windows device manager clearly shows an Arduino Leonardo is present on COM5 (USB) after briefly showing the Arduino Leonardo bootloader on COM4.
So I'm confident the O/S can see me physically plug-in the Leo and the Windows device manager responds to the Leonardo's reset button being pressed.

Launch4j's debug log contains this...

Code: Select all

CmdLine:	D:\Arduino\arduino-1.0.4\arduino.exe --l4j-debug
WOW64:		no
Working dir:	D:\Arduino\arduino-1.0.4\.
Bundled JRE:	java
Check launcher:	D:\Arduino\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:	D:\Arduino\arduino-1.0.4\java\bin\javaw.exe
Launcher args:	-Xms128m -Xmx128m -classpath "lib;D:\Arduino\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:	164/32768 chars
Simply starting up Arduino.exe now takes ages and then reports the Launch error - even with an empty sketch.

The only smoking gun is the Windows update that took place about the time this went pear shaped.
But I can't imagine any developer being so stupid to have their software be dependent on Windows O/S broken features (such as the registry) or Sun's Java cushions.

I'm trying to find a way to use AVR's gcc compiler and the AVRdude programmer - it would be real nice if guidance could be given on this - since the involvement of the Java cushions is obviously the root cause of these problems that hundreds of developers must be suffering right now.

Hope this helps...

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: What does mean by Launch4j error?

Post by Franklin97355 »

I'm trying to find a way to use AVR's gcc compiler and the AVRdude programmer - it would be real nice if guidance could be given on this - since the involvement of the Java cushions is obviously the root cause of these problems that hundreds of developers must be suffering right now.
Have you tried the official Arduino site at Arduino.cc ?

user0307
 
Posts: 8
Joined: Wed Jul 03, 2013 6:07 pm

Re: Launch4j error?

Post by user0307 »

I have now determined that Arduino.exe will hang for a couple of minutes and then raise the Launch4j error only if the Leonardo is plugged in. So I can launch the IDE without the error, but the IDE will assume COM1 is the selected port. As soon as I plug in the Leo, the Tools menu takes about a minute to respond, but the offers COM5 which I select.
I can compile the example Blink, in a few seconds. Then I try to upload.
The status bar responds with "Uploading..."
"Binary sketch size: 4,826 bytes (of a 28,672 byte maximum)"
With "Arduino Leonardo on COM5" in the lower right corner.
The progress bar goes to about 95% and then stops.
There are no lights flashing on the Leonardo as you would normally expect. Just a green power LED on constant.
The "play" button which launched the upload stays orange.
This hangs for about 10 minutes and then reports...

Code: Select all

processing.app.debug.RunnerException: Serial port 'COM5' already in use. Try quitting any programs that may be using it.
	at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:157)
	at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
	at processing.app.Sketch.upload(Sketch.java:1671)
	at processing.app.Sketch.exportApplet(Sketch.java:1627)
	at processing.app.Sketch.exportApplet(Sketch.java:1599)
	at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
	at java.lang.Thread.run(Thread.java:619)
Is my Leonardo broken already?
Can anyone help ?

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: What does mean by Launch4j error?

Post by adafruit_support_bill »

Try pressing the reset button on the Leo as soon as the "Uploading" message appears.

user0307
 
Posts: 8
Joined: Wed Jul 03, 2013 6:07 pm

Re: What does mean by Launch4j error?

Post by user0307 »

Hi bill,

I finally have something I can work with. I pressed the reset button on the Leo just as the "Uploading" status message appeared on the IDE and it worked. Thanks very much for the suggestion - I knew about this rain dance move but didn't think to use it - dooh!

While the good and honest Windows' Device Manager truely reflects the physical state of affairs - i.e. if the Leo is plugged in Device Manager shows it as such, the dodgy Java-based IDE loses COM5 from the list in Tools/Serial Port menu item. Is Java broken? How would I know?

This isn't normal behaviour, and that worries me. What else is going to stop working right when I need it to work?

I tried plugging in my Arduino Uno (R3) which is detected on COM3 - that works a treat, 100% okay.

I was trying to develop some NFC Shield code on the Leo - is it possible for me to break the Leo simply by downloading toxic code ???

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: What does mean by Launch4j error?

Post by adafruit_support_bill »

I tried plugging in my Arduino Uno (R3) which is detected on COM3 - that works a treat, 100% okay.
The Leo (and other 32U4-based Arduino derivatives) are fundamentally different from other Arduinos in how they interface to the host and IDE. An UNO has a permanent USB/Serial interface implemented in the on-board 16U2 chip. The Leo implementes that function right in the main 32U4 processor. On reset, the Leo disconnects as a USB/Serial device and reconnects as a 32U4 for download. It is supposed to reset automatically, but that doesn't work all that reliably. The manual reset usually does.
is it possible for me to break the Leo simply by downloading toxic code ???
I don't think you can brick it downloading via the IDE and Bootloader.

spawny
 
Posts: 2
Joined: Fri Nov 15, 2013 8:28 pm

Re: What does mean by Launch4j error?

Post by spawny »

rename the arduino folder in C:\Users\your_user\Documents\ ans restart arduino.After copy the sketches from the renamed folder back in the new arduino folder. I had same problem and this was helping me

User avatar
mojotexas
 
Posts: 4
Joined: Wed Feb 01, 2012 4:02 pm

Re: What does mean by Launch4j error?

Post by mojotexas »

I have this same problem, I don't have a solution, but I just want to add a suggested troubleshooting step which will rule out some Java issues.
I went to https://www.java.com/en/download/installed.jsp to test my java and found that I had both the latest version and an old version of Java installed. I allowed the tool to uninstall my old version of Java.
Sadly, this did not solve the problem for me. I still get the Lanch4j error, but it does remove one possible issue.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”