Jack,
I think your getting the DEBUG variable mixed up with another option.  I
can't remember it name.  But allows developers to add debugging statements
during checkout and remove them for distribution.  I can't recall the name
now.

> ----------
> From:         Jack Pien[SMTP:[EMAIL PROTECTED]]
> Reply To:     Discussion list for Java 3D API
> Sent:         Wednesday, August 02, 2000 8:25 PM
> To:   [EMAIL PROTECTED]
> Subject:      [JAVA3D] Java compiling question
>
> hi,
>
> i have a general Java compiling question.  the app i'm writing has a debug
> build and release build (basically toggling of a static final DEBUG
> variable - debug code is encased inside the if ( DEBUG ) conditionals).  i
> understand that if DEBUG = false, all the code inside the scope of the
> conditional is not compiled into the class file.  but i found that the
> compiler still compiles the class files of the Objects i instantiate
> inside the if ( DEBUG ).  is there a way around this - i know there isn't
> any pre compiler syntax (ie C's #ifdef) in Java?  is there harm in just
> deleting the compiled .class files which will never be used in a release
> build (and the code shouldn't be compiled in the .class file to use them
> anywayz).
>
> an example is:
>
> class Test {
>     public static final boolean DEBUG = false;
>
>     Test () {
>         if ( DEBUG ) {
>             NewObject a = new NewObject();
>         }
>     }
> }
>
> Test.class gets compiled as well as NewObject.class gets compiled - but
> theoretically the code inside if (DEBUG) isn't.
>
> thanks.
>
> jack
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to