#1 Compilation errors

closed
Thorsten Heit
None
5
2002-05-03
2002-04-28
Anonymous
No

I Obfuscate of my source code, which includes maintain
a number of classes, methods and attributes for
external reference.

I'm then attempting to compile some other code that
references the Obfuscated JAR. I'm getting compile
errors for incompatible types for all references
to 'null'. The compiler seems to think 'null' is of
int type, so any assigment throws an error.

I reverted the compilation back to the unobfuscated
JAR and it works fine.

I had the same problem with RetroGuard and switched to
JavaGuard to try to resolve - but same problem.

Have you come across this before ?

Discussion

  • Logged In: NO

    I have resolved this.
    I reviewed the process logs and it highlighted to me that
    variables are being renamed with reserve words.
    The problem was caused where I was extending a Obfuscated
    class that now has a variable called 'null', so references
    to null were picking up the attribute instead of the
    referenced word.

     
  • Thorsten Heit
    Thorsten Heit
    2002-05-03

    • assigned_to: nobody --> glurk
    • status: open --> closed
     
  • Thorsten Heit
    Thorsten Heit
    2002-05-03

    Logged In: YES
    user_id=463419

    I wouldn't recommend using the obfuscated Jar file as input
    for your compiler. As you have seen in the log file methods
    and variables can be assigned reserved names (Java
    keywords). This is allowed only in a class file; when trying
    to compile a normal Java file this will result in
    compilation errors.

    Currently you should put every part of your application into
    one single Jar file _before_ you start any obfuscation process.