[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2009-12-22
9
Medium Priority
?
2,377 Views
Last Modified: 2013-12-15
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)
0
Comment
Question by:stevelopez
  • 4
  • 4
9 Comments
 
LVL 6

Expert Comment

by:arevuri
ID: 26110363
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.
0
 

Author Comment

by:stevelopez
ID: 26112381
Arevuri,

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...

-Steve
0
 
LVL 5

Expert Comment

by:gksinghiet
ID: 26146104
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?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:stevelopez
ID: 26146172
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)
0
 
LVL 5

Expert Comment

by:gksinghiet
ID: 26146494
Did you try diselecting the build automatically selection.
See the attached screenshot.
Eclipse.JPG
0
 

Author Comment

by:stevelopez
ID: 26146550
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.
0
 
LVL 5

Expert Comment

by:gksinghiet
ID: 26146691
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.
0
 

Accepted Solution

by:
stevelopez earned 0 total points
ID: 26162470
I solved this myself, albeit not permanently, by turning off the JavaScript validation in the 'Builders' config screen.
0
 
LVL 5

Expert Comment

by:gksinghiet
ID: 26164288
Great. Thanks for sharing your solution.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses
Course of the Month18 days, 14 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question