get byte code

Discussion in 'Java' started by geirgp@gmail.com, Jul 24, 2006.

  1. Guest

    Is there a way to get the byte code from classes that may not be in
    classpath, that could be classes created and loaded at runtime by a
    script engine, etc.

    Thanks

    Geir
     
    , Jul 24, 2006
    #1
    1. Advertisements

  2. wrote:
    > Is there a way to get the byte code from classes that may not be in
    > classpath, that could be classes created and loaded at runtime by a
    > script engine, etc.


    It's available through instrumentation (java.lang.instrument).

    Tom Hawtin
    --
    Unemployed English Java programmer
    http://jroller.com/page/tackline/
     
    Thomas Hawtin, Jul 24, 2006
    #2
    1. Advertisements

  3. geir Guest

    Thomas Hawtin wrote:
    > > Is there a way to get the byte code from classes that may not be in
    > > classpath, that could be classes created and loaded at runtime by a
    > > script engine, etc.

    >
    > It's available through instrumentation (java.lang.instrument).


    Thanks, that looks good! However I noticed that for this to work a
    special comman line argument must be passed, but is there any way
    instrumentation could be activated from within the code instead?
     
    geir, Jul 24, 2006
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas
    Replies:
    1
    Views:
    1,337
    Jonathan Bromley
    May 4, 2004
  2. Bharat Bhushan

    Appending byte[] to another byte[] array

    Bharat Bhushan, Aug 5, 2003, in forum: Java
    Replies:
    15
    Views:
    41,413
    Roedy Green
    Aug 5, 2003
  3. Jean-Daniel Gamache
    Replies:
    0
    Views:
    552
    Jean-Daniel Gamache
    Jul 14, 2004
  4. Peter
    Replies:
    3
    Views:
    910
    Michael Borgwardt
    Aug 5, 2004
  5. Kirby
    Replies:
    3
    Views:
    956
    Kirby
    Oct 8, 2004
  6. Arun
    Replies:
    2
    Views:
    15,112
    William Brogden
    Dec 27, 2004
  7. Shane Wealti

    convert byte[] to Byte[]

    Shane Wealti, Jun 13, 2005, in forum: Java
    Replies:
    5
    Views:
    44,020
    Brzezi
    Jun 13, 2005
  8. gelonida
    Replies:
    1
    Views:
    982
    Gabriel Genellina
    May 6, 2010
Loading...