1

I have four Java projects in my Eclipse's workplace, and each one of them producing information that is needed to my another project.

I don't need to run each java project by click on each project and click run as java application.

I need a way that I call only one command or click on run only one time and all project are running.

I have four Java projects having name JavaSED1, JavaSED2, JavaSED3 and JavaSED4. They all are related in a way that JavaSED2 depends on JavaSED1 and JavaSED3 depends on JavaSED2, and so on.

! Following is the snapshot of all projects for better clarity

9
  • What's the question, or what's the problem (apart from the quite incomprehensible question in the title)? Commented Aug 8, 2015 at 9:03
  • @ nbro - i want to achieve above mentioned topic. Basically question is how to run multiple java project using single command ? Commented Aug 8, 2015 at 9:24
  • What do you mean by "running multiple Java projects"? Do you know that the main entry point of any Java program is the public static void main method? Commented Aug 8, 2015 at 9:27
  • @ nbro - Do u have clarity or need more explanation ? Commented Aug 8, 2015 at 9:34
  • @Saurabh: No you can not do that Since at run time only JVM has to load only one main method Commented Aug 8, 2015 at 9:48

1 Answer 1

1

Finally i figure out the solution. Let say we have four different java project and we want functionality like we need to run only one project/run command only single time (in order to avoid click or to run each project individually in order to avoid headache in testing ).Select only one project lets say JavaSED1 and go to properties->java build path->projects->add remaining three projects. So up to this we have done with dependency. Now in JavaSED1 main method provide call for rest of three projects main method and simply its working.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.