|
![]() |
Variant code handling (conditional compiling) for Java - simple approach:
Java does not support conditional compiling and it is very rare that you might need this. However, we did need it when migrating an application from JDK 1.4 to JDK 1.1.8 because of a PDA implementation.
You can use this tool writing one code, preprocess it, and create different versions out of it. This is not a high sophisticated tool, just something simple that might help you doing your work, so we wanted to offer it as "FREEWARE" following the conditions below. Source code is also provided.
Download or open here:
Description (PDF)
THIS UTILITY IS FREEWARE AND FREE ADVICE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. IF YOUR LOCALITY DOES NOT ALLOW THESE WARRANTY CONDITIONS, YOU ARE NOT GRANTED PERMISSION TO USE THIS UTILITY. DOOR2SOLUTION WILL NOT TAKE ANY RESPONSIBILITY OR LIABILITY FOR FAILURES, CORRECT, MODIFIED OR INCORRECT USAGE.
Java class file
Java source file