3

I was wondering if it's possible to run two projects at the same time in Eclipse, for example by using two different instances of JVM (if that makes any sense).

A bit of the background: I have a project that executes relatively long experiments (6-8h). I have recently managed to come to a point in development where I could branch off to develop different strategies for improving/adding code to the project. However at the same time I need to get some experiments done, and as the experiments take a long while to finish I'd like to make use of the long waiting time, and work on the branch code.

In short my ideal scenario is: start an experiment on the trunk in Eclipse, switch to the branch and develop code/run shorter experiments on the branch when I need to test functionality. Is this possible, or do I need to come up with an alternative strategy?

Thanks in advance!

EDIT: I have realized that the the word choice "test" was misleading as it could be misunderstood. I mean executing the program as it's supposed to run, not testing with JUnit or anything like that. I apologize for the inconvenience.

posdef
  • 6,196
  • 10
  • 40
  • 85
  • 1
    You certainly can be _developing_ code on trunk while tests run on a branch. However, if you are using standard junit, only one set of tests can be running at one time in Eclipse. One thing you could do is run the tests on an external continuous integration system such as cruise-control (http://cruisecontrol.sourceforge.net/). You could also switch to use TestNG (http://testng.org/) and speed up the long test run by running tests in parallel. – Gray Sep 20 '10 at 12:35
  • Unfortunately I have chosen a misleading word, it seems. I meant just executing the program (I run data mining tests for a lab here, hence the confusion). Thanks for the tips nevertheless. – posdef Sep 20 '10 at 12:52

2 Answers2

3

I just check out different branches as different projects. MyProjectTrunk, MyProjectBranch1, MyProjectBranch2 etc. No problem. The projects will never run on on the same JVM if you're using Run as Application.

Tommy
  • 3,856
  • 8
  • 33
  • 59
2

Of course it is possible - you just need to have them configured as two separate projects with separate run configurations for each of them.

Unfortunately as far as I remember when you close a project all the associated running tasks (svn commits, debugs, runs, etc.) shut down as well and having two separate branches of the same project open in the same time might get very confusing when using keyboard shortcuts for class browsing.

vstoyanov
  • 831
  • 5
  • 14