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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:23:58+00:00 2026-06-13T09:23:58+00:00

ASM and Javassist seem to have different advantages and shortcomings for generating/transforming Java bytecode.

  • 0

ASM and Javassist seem to have different advantages and shortcomings for generating/transforming Java bytecode.
For example, the byte code generation facility of Javassist is really easy to use since it is as simple as generating your program in a string and compile it on the fly.
However, sometimes the visitor approach of ASM seems more convenient for other kind of tasks (e.g., such as translating a Java routine to another language).

Is it possible to use both libraries in the same Java project so I could profit from the most convenient library according to the requirements of each different scenario ?. Any special consideration to keep in mind ?. I have the intuition that I cannot use both libraries for manipulating the byte code of the same class, but maybe even that is possible ?.

  • 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-13T09:23:59+00:00Added an answer on June 13, 2026 at 9:23 am

    From the common sense, if you troubled yourself to learn ASM and low-level Java bytecode, the Javassist will be somewhat redundant. But from practical point of view nothing stops you from using both. If I am not mistaken, Hibernate does exactly that.

    As for using ASM and Javassist on the same class, without going into specifics of each framework API, if you work just with byte array, you can just load and transform with one tool, get the result byte array and use another framework to process that byte array.

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

Sidebar

Related Questions

I'm using ASM java byte code instrumentation and my goal is to measure the
I am considering runtime byte-code generation/modification for a Java project. Two important, and still
Given Java bytecode and ASM bytecode analysis framework, how can I resolve a target
If I ran javap -c ASM.class > ASM.java to get the assembly code, how
In ASM i have the following code which encrypts a character. Inputs: EAX =
I have following asm MIPS code: 80031DB8 bnez $v0, loc_80031F58 80031DBC move $v0, $zero
I need a particular Data Analysis on ASM code using a Java Class or
I am writing essentially the equivalent of memset() using ASM. The code I have
I am using ASM in order to do bytecode instrumentation for Java programs. What
I have the following asm code (x86). .input: mov ah, 00h ; get key

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.