Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7563317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:38:10+00:00 2026-05-30T13:38:10+00:00

When obfuscating .class files annotations are removed. Is there a way to obfuscate these

  • 0

When obfuscating .class files annotations are removed. Is there a way to obfuscate these files(files containing annotations) without removing them. Is there a way to obfuscate non compiled .java files to preserve annotations, if it’s possible?


How does java compiler treat annotations and where are they preserved? why after obfuscation all the annotations are removed. Can’t I, after obfuscating the classes, bring back the annotations and put them back in their place in order to work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:38:11+00:00Added an answer on May 30, 2026 at 1:38 pm

    I asked and researched on annotations and obfuscation and I’ve found the following:

    1. Annotations are kept in the meta section of the class byte-code
      and it’s very hard to manipulate them. Obfuscation programs don’t deal with such classes
    2. I have tried a lot of obfuscators – commercial and opensource
      ones, but neither of them could obfuscate annotated classes that have
      all of their fields and methods annotated
    3. The only way left that I could think of is to use xml configured
      files instead of annotations
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way of Obfuscating code in Eclipse when the file is built,
I'm developing an application which will have these classes: class Shortcut { public string
They are ruining the page I'm making. Anyone know a way of turning them
Are there any .Net components for obfuscating JavaScript? I'm generating JavaScript dynamically & emitting
There are a few programs on the market that you can use to obfuscate
Is there a .NET obfuscation tool present for Linux? Or is there a class
Hi I was wondering how much Java class files change across different compilers. So
I've got a script that runs a custom email obfuscation class's Obfuscate() function on
I found that there seem to be 2 general solutions: don't obfuscate what is
Is there a way to filter certain packages from obfuscation? Currently obfusticating a certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.