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 6067235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:35:12+00:00 2026-05-23T09:35:12+00:00

I am able to rename a compiled java class with any string that has

  • 0

I am able to rename a compiled java class with any string that has the same length of the previous class name, but when the length is different the .class file stop working and shows an error like:

unknown constant tag X

Where X is a number that changes every time I try to run the applet.

Is there a way to rename a compiled java class with a string of different length of the previous name without using an external program? just editing the .class text contents.

  • 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-23T09:35:12+00:00Added an answer on May 23, 2026 at 9:35 am

    I’ll go right out and say it – manually editing the .class file is probably not the best idea. I mean, it can’t really be that hard to recompile your program. Plus, if you just rename the class inside the original source, then your source will actually match the class file (why not?). And if you don’t have the source, I’m sure you find a decent decompiler (just google it – there seems to be a few good ones). This would allow for easier renaming of classes.

    However, if you really, really want to directly manipulate your compiled code, you might want to check out the ASM project. I believe it allows you to do what you want (though it seems a little complicated to me, and it would involve creating an external java program, just like you don’t want).

    If you’re still bent on manually altering the .class file, then may I recommend you to The JAVA Virtual Machine Specification (specifically chapter 4), where you can get all the yummy details of .class files.

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

Sidebar

Related Questions

Actually a simple question, but I wasn't able to find any good conclusive answer.
Application able to record error in OnError, but we are not able to do
You should be able to create a generic form: public partial class MyGenericForm<T> :
I'm able to connect to and read an excel file no problem. But when
I want to be able to capture the exception that is thrown when a
Has anyone been able to get an NHibernate-based project up and running on a
I'm totally new to both java and java Server worlds... But I've a good
This question has been asked before and I did followed the instructions but my
I'd like to create a class called Object to be able to implement toString(),
i have directory that has 2 sub-directories and that again has few sub-directory and

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.