Eclipse 'build before launch' completes but the application won't start until clicking 'Run' a second time

When I 'run' a java class Eclipse does a build but the program won't start.  I have to manually click 'Run' again.   This didn't use to be the case with Eclipse 6.5 or 7.0.

I presume there's a configuration issue with the compiler/builder but I don't see any obvious settings.  Looking for suggestions.

Note: When I click 'Run' the first time I see 'Scoped incremental build' activity in the Progress window.  It completes successfully but the code is never executed (Until I click 'Run' again)
Who is Participating?
stevelopezConnect With a Mentor Author Commented:
I solved this myself, albeit not permanently, by turning off the JavaScript validation in the 'Builders' config screen.
1) Check if there are any dependency projects for your java class. If yes, remove those dependencies.
2) Turn of automatic build (Project-->) and try again
3) Once you change the program and click on Run, it will automatically  build and run the program.
stevelopezAuthor Commented:

There are no dependencies on other projects - just dependencies on  the typical jar files (MySQL, Log4j, etc) and all of those are in the path.

Note: this is a web project, so there is a WebRoot folder with JSP files.  Not sure that matters but thought I should share that info.   During the auto-build triggered by clicking 'Run', I sometimes see it reference that folder even when I haven't changed any of the JSP files...

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Are you running as "Java Application" or "Run on Server"?
Also Eclipse is still under 3.5 (Galilio), are you using some extension of Eclipse like MyEclipse, etc?
stevelopezAuthor Commented:
No project dependencies.   While the project is a 'Web Project', I am running this particular class as a Java Application (its a utility class used at design time.  I've been doing this since Eclipse 2.x days without problems).

I am running MyEclipse 8.0. Does that help?    I have also turned off all JSP and JavaScript validation for the project (it is a Web Project) but I still see references to my WebRoot folder during the build. (I would expect to see only src folder references)
Did you try diselecting the build automatically selection.
See the attached screenshot.
stevelopezAuthor Commented:
no luck.  I turned the option off, changed a line in my code and click 'Run XYZ'.    The 'Progress' window showed the following text:

Launching XYZ
<<progress bar here>>
Launching : Build before launch - Scoped incremental build before launch... Validating <project>/WebRoot/folder1/folder2

the progress completes but the class is never executed.  I have to hit 'Run' again and then it will run properly.
If you chanage the file and try to run it it will build no matter whether you enable to automatic build option or not. But it should run the java program automatically after finishing the build. The problem seems to be specific to MyEclipse, and I have no prior experience in MyEclipse.
Great. Thanks for sharing your solution.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.