[josm-dev] Switch to Java 6?

Dirk Stöcker openstreetmap at dstoecker.de
Sat Nov 28 21:05:27 GMT 2009


On Sat, 28 Nov 2009, Ľubomír Varga wrote:

>> Yes. "#ifdef DEBUG" and other conditionals are one of the features I most
>> miss in Java.
>
> Simple use normal if/then. Java VM will recompile it at runtime. This probably
> wont work in java5 if compiled for java6 :-(
> http://www.devx.com/tips/Tip/13342

Runtime handling is no usuable solution. When you have conditionals you 
don't want specific code in a version (e.g. commercial software shipped 
with debug code is somewhat strange).

> This solution should work better
> http://weblogs.java.net/blog/schaefa/archive/2005/01/how_to_do_condi_1.html

I use that usually, but it's a crude workaround. :-)

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)


More information about the josm-dev mailing list