3

I use Eclipse IDE for my java projects and there are times in which I need to change some constants and test the effect of it.

But on change of the code I have to rebuild it which generally takes me 40 min and 5 more mins to start the server in debug mode.

So I am looking for some tools which make my task easy like cutting the rebuild time at least by 50 %.

Stephan
  • 41,764
  • 65
  • 238
  • 329
MissingNumber
  • 1,142
  • 15
  • 29

2 Answers2

2

You can put your constants out of the code. Put them in a properties file for instance. Then change your code to read the constants right from the properties file.

You will be able to build your code once and change the constants whenever you want.

Stephan
  • 41,764
  • 65
  • 238
  • 329
1

If you're not already using it, you probably should look into setting up a continuous integration solution like Jenkins. You could automate builds to poll your code repository and monitor for changes, then run a suite of builds and tests with different flavors of constants to see the effect on your system.

David
  • 2,602
  • 1
  • 18
  • 32
  • Yeah it looks great with the set of the constants ! But how does it help me with the code change to take effect ? – MissingNumber Feb 18 '13 at 10:59
  • I'm not sure I understand your question about "code change to take effect". If you're re-building your project with ant given a new set of constants, wouldn't that imply everything is getting recompiled? – David Feb 19 '13 at 18:40
  • Yeah that is what I'm concerned of ! Will it recompile all the source ? Or the Dependent source of the modified content ? – MissingNumber Feb 20 '13 at 08:37
  • 2
    That depends on how you configure your job on Jenkins and how your ant build works. If, for example, your Ant build has a target "compile" that compiles everything, and you make Jenkins run that target, then yes, it'll recompile the source. Jenkins can also string together builds and resolve artifacts produced between different builds. For example, build 1 runs, on success triggers builds 2 and 3 which pull in artifacts from build 1. – David Feb 20 '13 at 16:20