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

  • Home
  • SEARCH
  • 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 8702431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:39:06+00:00 2026-06-13T02:39:06+00:00

Java Platform SE 5 API specification for method Instrumentation.redefineClasses(ClassDefinition[]) tells: The redefinition may change

  • 0

Java Platform SE 5 API specification for method Instrumentation.redefineClasses(ClassDefinition[]) tells:

The redefinition may change method bodies, the constant pool and
attributes. The redefinition must not add, remove or rename fields or
methods, change the signatures of methods, or change inheritance.

What is meant by attributes? I supposed it can be access modifiers (private, public, …), synchronized, final and other modifiers. But if I try to redefine not only the method body, but also its access modifier, or access modifier of the class, or try to make a method synchronized, I’ve got

java.lang.UnsupportedOperationException: class redefinition failed: attempted to change method modifiers
        at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
        at sun.instrument.InstrumentationImpl.redefineClasses(Unknown Source)

So what is attributes in this context?

  • 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-06-13T02:39:08+00:00Added an answer on June 13, 2026 at 2:39 am

    J2SE5 currently only supports the modification on method body and value of fields. If you modify the access modifiers it means you totally change the interface of the class.

    For attribute, it is a very vague concept in Java Programming, I have no idea why they put this word into their document. When we say attribute, we mean the Attribute in Java Naming API in most cases.

    Redefinition class provide a dynamic way to change the runtime behavior of a existing system. Widely used by AOP I think.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Many parts of the Java API work differently depending on platform defaults, for example,
I'm developing a platform API with Java and I must choose an exchange data
Can someone explain the differences of the Java Platform SE (6), Java, Java VM,
I'm a .NET developer who needs to use the Java platform for a new
I'm developing a real time strategy game clone on the Java platform and I
I have netbeans 6.8 with java ME platform setup on my ubuntu 9.10. My
I have built a web application using Java EE platform that sells one of
Is there any open source CMS in a java/xml platform which supports REST based
Reading among the list of possibilities of the Java ME platform, its possible for
Java and .NET are two languages targeted at removing platform dependence. This is achieved

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.