javadebug-symbols

Compiling parts of Java app with debugging symbols


I'm looking into using this library for our Java-application: http://code.google.com/p/aparapi/. One requirement for this library is that the code is compiled with debugging symbols. I.e. with the -g parameter enabled (see their FAQ). We don't want to enable debugging information for our entire app. Is it possible to only compile the classes that interact with this library using -g and then compile the rest of the code without any debugging information (possibly even obfuscate the rest of the code).


Solution

  • Sure you only need to compile the 'Kernel' class using -g.

    If your kernel is an anonymous inner class this can be tricky ;) but you can compiler the containing class with -g. Then copy the ${n}.class file to one side and recompile without -g and copy the ${n}.class file with debug symbols over the one without. If that makes sense.

    I should have been clearer in the FAQ. I will make this change to the FAQ.

    Gary