Extracting method names from JNI probes

Hello.
I would like to use the Call* probes from the hotspot_jni provider. These probes provide as argument a "method id". My question is how I can extract, for instance, the method name from this ID. I saw that JNI provides a method "GetMethodName" but being a dtrace novice, I am unsure how to obtain a handle to the JNI api from within dtrace.
Any hint would be greatly appreciated.
Best wishes,
Eric

Actually, it can be done. Otherwise, how do you think debugger shows variables and formal parameters?
You should compile your aplication with debuginng information (for details see tools doc). Then you have 3 options:
1) run application under debugger and use JVMDI to get everything you want;
2) use bytecode libraries (BCEL, CGLib etc) to read class file and fetch required information through their API
3) write your own class file parser based on class file format described in Java Virtual Machine Specification
First way is quite complex and is definitely not for "production use".
Second way is the best in case you have time limitations, but size of your application will be increased because of thrid-party libraries.
Thrid way is the best if you have application size restrictions and have enough time to write simple class file parser to fetch that specific information (1-2 days depending on your experience).
Have fun ;)

Similar Messages

  • How to extract channels names from PhotoShop-written TIFFs?

    Hi,
    Does anybody know how to extract channel names from PhotoShop-written TIFFs? (I'm really asking about spot color channel names, as basic channel names, such as "Red," "Green," "Blue" or "Cyan," "Magenta," "Yellow," and "Black" can obviously be derived from the color space tag.)
    There's some XMP data in those TIFFs, but manual inspection does not seem to reveal channel names. So, this may not be an XMP question, after all. There's also a larger (for metadata) data block associated with a private (Adobe) tag, which could contain the information. It's binary, though, and I wouldn't know how to crack it open.
    The data must be present somewhere in the file, as PhotoShop will show the channel names on re-open of the TIFF.
    There's a TIFF/IT TIFFTAG_INKNAMES tag, which PhotoShop doesn't utilize.
    Any pointers greatly appreciated.
    Thanks,
    Oliver

    Solution is to speak to Adobe directly and receive confidential info.

  • Extract plot names from waveform

    Hello
    Is it possible to extract plot names from an array of waveform to a new array that contains all the plot names.
    Regards,
    Solved!
    Go to Solution.

    If you are using Waveform data types to update your plot then you can iterate through all channels and pull out the name attribute or,
    You can use a For loop that uses the iteraction terminal to drive the "Active Plot" property of the indicator and then pull the name using a second (preferably an expanded property node) and let the names pile up in an auto-indexing output tunnel.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Invoke a method by getting method name from properties object

    HI ,
    I am storing method names in a properties file . Can any one tell me , how can I invoke those methods ?? Please Urgent.
    Here is the sample program what I am trying to do . Please tell me how to invoke method which is represented by the String "methodTobeInvoked" in the below program.
    public class HelloWorld {
         private String name="meena";
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public static void main(String[] args) {
              try {
                   Properties props=new Properties();
                   props.setProperty("method", "getName()");
              String methodTobeInvoked= props.getProperty("method");
              }catch (Exception ioe) {
                   System.err.println(ioe.getMessage());
    Thanks!!!

    meenaalenoor wrote:
    I am storing method names in a properties file . Can any one tell me , how can I invoke those methods?
    Here is the sample program what I am trying to do.
    Please tell me how to invoke method which is represented by the String "methodTobeInvoked" in the below program.
    public class HelloWorld {
         private String name="meena";
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public static void main(String[] args) {
              try {
                   Properties props=new Properties();
                   props.setProperty("method", "getName()");
              String methodTobeInvoked= props.getProperty("method");
              }catch (Exception ioe) {
                   System.err.println(ioe.getMessage());
    }Have you looked at [java.lang.reflect|http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/package-summary.html] ?

  • Extract first name from string

    Post Author: gronkette
    CA Forum: General
    If I have the followng list:
    SCHEELS, Julie
    CURTIS, Tobi
    JOHNSON, Dawn    etc....
    How do I extract the First name following the comma?  I've been able to extract the Last name several ways.
    thanks!

    Post Author: gronkette
    CA Forum: General
    When I use the Split function with [2]..... I get the following error:
    A subscript must be between 1 and the size of the array...
    works great with [1].
    -j-

  • Extracting file name from directory folder (~cont)

    what if I want to retrieve indiviual files of a certain file type...e.g. *.jsp file type, from a directory folder??

    You can implement a FileFilter, then use the listFiles method of the File class to return the related files:
    import java.io*;
    public class JspFileFilter implements FileFilter {
         public boolean accept(File pathname) {
              return (pathname.getName().endsWith(".jsp"));
         public static void main(String[] args) {
              File directory = new File("c:/web");
              File[] jspFiles = directory.listFiles(new JspFileFilter());
              for (int i=0;i<jspFiles.length;i++) {
                   System.out.println(jspFiles[ i ].getName());
    }

  • Extract class names from package

    I would like to be able to have te names of some classes. So I will be able to add new classes without changing other classes. I'm writing an application where I explain different kinds of sorting algorithms. I would like to be able to make a list of algorithms that are implemented. And also it should be no problem to add new algoritms. Each algorithm is in another class with a name that's related to their original name. It would be easy that when someone adds a new algorithm, he/she only have to implement a new class without looking at the other classes.
    If it is not clear what I mean, just ask.
    Greetz

    I would like to be able to have te names of some
    classes. So I will be able to add new classes
    without changing other classes.Huh? What keeps you from simply doing it?
    I'm writing an
    application where I explain different kinds of
    sorting algorithms. I would like to be able to make
    a list of algorithms that are implemented. And also
    it should be no problem to add new algoritms. Each
    algorithm is in another class with a name that's
    related to their original name. It would be easy
    that when someone adds a new algorithm, he/she only
    have to implement a new class without looking at the
    other classes.That's what abstract classes are for.

  • Extracting file name from directory folder

    Hi,
    I need to loop a folder to retrieve out individual files.
    Is there any way to do it??
    Thank You!
    Michelle

    import java.io.File;
    File dir = new File("your directory name");
    File[] files = dir.listFiles();
    for (k=0; k < files.length; k++) {
      File currFile = files[k];
      do something
    }

  • How do I write javascript for a text block to extract name from signature block?

    Hello,
    I've created a training certificate that the trainee has to sign electronically. To prevent someone from simply putting in their friends name in there and saving it; to send to their friend and help them from having to take the training and quiz I would like to write a javascript in the text block that would extract the name from their signature block and autofill the name in the text block. Is there a way to do this?

    You would have to use JavaScript to access the signature field object and then you can access the various properties of the signature depending upon the certificate or method for signing.
    signatureInfo
    console.show();console.clear();
    // Get particular info;
    var f = this.getField("Signature1");
    // uses the ppklite sig handler;
    var Info = f.signatureInfo();
    // Some standard signatureInfo properties;
    console.println("name = " + Info.name);

  • Extract the name of a digital ID from a smart card and place in a field

    In DoD we use Smart Cards, commonly called 'Common Access Card (CAC)', I am wondering if it's possible to extract the name of the user from their CAC, or at least be able to extract the name from a .FDF file. If you go to 'Sign & Certify' from Acrobat 10.x, and then go to 'More Sign & Certify', then click on 'Security Settings', again, this only applies if you have either a Smart Card or digital ID, you will see the security settings menu. Within this menu, you will see the option to 'Export' the file to either an email or save the data to a file. When you click next, you have the option to save as and .fdf file or .p7c file. Is it possible to create a button or a digital signature that will allow me to export the name of the user to a field?

    Hi bsabourin1962,
    It can be done by creating a button with a script to extract the name of the user.

  • Extracting file name text

    I have written a script that automatically sends out via FTP application Transmit, any new file that enters into a hot folder
    what I need now is..
    a script that writes information on a textedit document
    I need
    •open up a textedit document
    then prints
    •the file name "theFile"
    •time and date
    •then saves the file on the desktop
    THEN when another file is sent, the script adds that the next file done info to the text file thus creating a list of completed tasks

    File Name, Time, and Date format -
    on adding folder items to this_folder after receiving these_items
    -- Create or open, and edit, 'Folder_Contents.txt' on the 'Desktop'.
    set FILE_REF to open for access file (((path to desktop folder from user domain) as string) & "Folder_Contents.txt") with write permission
    repeat with i in these_items
    tell application "Finder" to set file_Name to ((displayed name of i) as string)
    -- Writes the string at the end of 'Folder_Contents.txt'. (File Name, Time, and Date format)
    write (file_Name & " " & (do shell script ("date +%H.%M.%S' '%d.%m.%Y")) & return) to FILE_REF starting at eof
    end repeat
    close access FILE_REF -- Close 'Folder_Contents.txt'.
    end adding folder items to
    ... or. Date, Time, and File Name format -
    on adding folder items to this_folder after receiving these_items
    -- Create or open, and edit, 'Folder_Contents.txt' on the 'Desktop'.
    set FILE_REF to open for access file (((path to desktop folder from user domain) as string) & "Folder_Contents.txt") with write permission
    repeat with i in these_items
    tell application "Finder" to set file_Name to ((displayed name of i) as string) -- Extract file name from files' full path.
    -- Writes the string at the end of 'Folder_Contents.txt'. (Date, Time, and File Name format)
    write ((do shell script ("date +%d.%m.%Y' '%H.%M.%S")) & " " & file_Name & return) to FILE_REF starting at eof
    end repeat
    close access FILE_REF -- Close 'Folder_Contents.txt'.
    end adding folder items to
      Mac OS X (10.4.4)  

  • Re: Method name and/or line number available from withinForte?

    To my knowledge there is no such capability with forte, and for sure it
    would be nice. Short
    of storing all that metadata at runtime, a compile-time substitution such
    as is done with
    most C preprocessors would work as well.
    However, I believe the solution you've identified falls short in a deployed
    fashion - I think
    all that method name/line number stuff is only available from the workshop...
    -J
    At 02:54 PM 10/27/98 -0600, [email protected] wrote:
    I'm sure this question has been asked many times, but I don't know that I've
    ever heard the answer. Is there any way from Forte to access the method
    name of the currently executing method? What about the current line number?
    I'm sure you all know what I'm getting at by now -- when raising your own
    custom exceptions or logging messages we'd like to be able to not hard-code
    method names and line numbers into them. I know these are available with
    log flags so this information is stored somewhere -- is there an API to
    access it on an agent, the task, or the environment? The only way I can
    think of doing this (which is not-so-elegant) is to force a Forte exception
    to be raised (like access a method on a null TextData or something), then
    immediately catch it and extract the method and line number from it. Is
    there a more elegant way?
    -J.C.
    J.C. Hamlin, Senior Consultant, Forte National Practice
    Born Information Services Group, Wayzata, MN
    Ph: (612) 404-4000 Ph2: (612) 783-8270 FAX: (612) 404-4441
    <[email protected]> <[email protected]>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>**************************************
    John L. Jamison
    Vice President and Chief Technology Officer
    Sage IT Partners, Inc.
    415 392 7243 x 306
    [email protected]
    The Leaders in Internet Enabled Business Change
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Method task.TraceBack () returns a string suitable for shoving on the error
    stack, and representing a call trace. The method
    method TomW_RaiseException.RaiseException
    begin
    ge : GenericException = New ();
    ge.SetWithParams (SP_ER_USER, task.TraceBack ());
    task.ErrorMgr.AddError (ge);
    Raise ge;
    end method;
    produces the following when called from the display method of the window in
    which it is embedded.
    USER ERROR:
    Traceback:
    TomW_RaiseException.RaiseException at line 2
    TomW_RaiseException.Display at line 4
    TomW_RaiseException. at offset 13
    C++ Method(s)
    UserApp.Run at offset 96
    Class: qqsp_Exception
    Last TOOL statement: method TomW_RaiseException.RaiseException, line 3
    Error Time: Wed Oct 28 08:28:34
    Exception occurred (locally) on partition "TomW_Test_CL0_Client",
    (partitionId = AA6475E0-3DD2-11D2-B582-04228BFFAA77:0x117f:0x6,
    taskId =
    [AA6475E0-3DD2-11D2-B582-04228BFFAA77:0x117f:0x6.34]) in application
    "FTLaunch_cl0", pid 195 on node SPNMXSHOP7 in environment SFDEVL.
    I suppose that a sufficiently determined person could parse the results of
    TraceBack () and extract the
    method and line from it. But I know of no method that explicitly returns
    the name of the calling method.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Using oc4j to generate interfaces from wsdl produced improper method names

    The method names that were produced from the opperations in my WSDL, generated an interface file with incorrect method names. The name went from "DoTest" in the wsdl to "doTest" in the Interface file.
    I double checked and all the cases are correct in the wsdl.
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by John Reynolds (MedPlus) -->
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:y="http://localhost/TestService" targetNamespace="http://localhost/TestService">
         <types>
              <xs:schema targetNamespace="http://localhost/TestService" xmlns="http://www.w3.org/2001/XMLSchema">
                   <xs:element name="Tresult" type="xs:string"/>
                   <xs:element name="Tname" type="xs:string"/>
                   <xs:element name="Tfault" type="xs:string"/>
              </xs:schema>
         </types>
         <message name="DoTestResponse">
              <part name="Result" element="y:Tresult"/>
         </message>
         <message name="DoTestRequest">
              <part name="Name" element="y:Tname"/>
         </message>
         <message name="DoTestFault">
              <part name="ExceptionDetail" element="y:Tfault"/>
         </message>
         <portType name="TestService">
              <operation name="DoTest">
                   <input message="y:DoTestRequest"/>
                   <output message="y:DoTestResponse"/>
                   <fault name="DoTestException" message="y:DoTestFault"/>
              </operation>
         </portType>
         <binding name="TestService" type="y:TestService">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="DoTest">
                   <soap:operation soapAction="urn:#DoTest" style="document"/>
                   <input>
                        <soap:body use="literal"/>
                   </input>
                   <output>
                        <soap:body use="literal"/>
                   </output>
                   <fault name="DoTestException">
                        <soap:fault name="DoTestException" use="literal"/>
                   </fault>
              </operation>
         </binding>
         <service name="TestServiceSoap">
              <port name="TestService" binding="y:TestService">
                   <soap:address location="http://localhost/TestService"/>
              </port>
         </service>
    </definitions>

    Obviously one could rename the operation to that standard, but that doesn't exactly strike me as being anything other that a work around for a bug.
    WSDL provides a contract in which multiple languages have to conform to a set of interfaces, and it's not exactly good to have a tool, just a assume the contract for an interface is wrong.
    I could argue that I'm only doing Java on the front end and .Net on the client side and that they don't neccessarily follow the Java convention, nor should be constrained by it.
    I do agree with you that they probably just followed the convention when writing to code generator and just happened to pick up the convention. They just need to fix it now.

  • How to extract email address from Outlook friendly name cache

    Hi guys,
    A while ago, somebody wrote a little VBA utility to help us to log CRM events. Whenever a user sends an email to a customer, it logs the fact in our CRM database. This is the programmatic process:
    1. Grab the email address from ActiveInspector.CurrentItem.To
    2. If it's a valid email address, all well and good. Proceed to Step 8.
    3. If not a valid email address (it must be a friendly name, perhaps located in Exchange), look for the address in:
    ActiveInspector.CurrentItem.Recipients.Item(1).AddressEntry.GetExchangeUser.PrimarySmtpAddress
    4. If it's a valid email address, all well and good. Proceed to Step 8.
    5. If not a valid email address (it must be in the user's Contact list), look for the address in:
    ActiveInspector.CurrentItem.Recipients.Item(1).AddressEntry.GetContact.Email1Address
    6. If it's a valid email address, all well and good. Proceed to Step 8.
    7. If not a valid email address, then crash!!!         <<------------------------------------------------- Here's where I'm stuck!
    8. Get the CustomerID from the CRM, based on email address.
    9. Do a bunch of other stuff (for example, send the email, and log the event in the CRM).
    I'm a former Access MVP, and am highly experienced with VBA, but my forte is clearly not Outlook. What I'd like to do is find the email address by looking in the local cache, and make sure I get the actual email address rather than the friendly name.
    I'm not sure if 'local cache' is the right word; I know Outlook stores frequently used email address in some sort of cache, even if the user has not explicitly stored it as a Contact. I just don't know how to find it. Can anyone point me in the right
    direction, maybe with a method name?
    Also, while mucking about with it, I found the following. Would it be useful in this scenario?
    ActiveInspector.CurrentItem.Recipients.Item(1).AddressEntry.GetExchangeDistributionList
    Many thanks,
    Graham R Seach
    Regards, Graham R Seach Sydney, Australia

    Hi Graham,
    This might help you to figure things out a bit.
    The contact cache you are looking for is called the nickname cache, also known as the "autocomplete stream."
    The nickname files (.nk2) used by older versions of Outlook (2007 and below).
    Outlook 2010 and 2013 does not use the NK2 file; it stores the autocomplete cache in the mailbox or data file and caches the addresses in an autocomplete stream at C:\Users\username\AppData\Local\Microsoft\Outlook\RoamCache. The cache is stored in a file
    named Stream_Autocomplete_0_[long GUID].dat.
    For applications that interact with Outlook 2010 or Outlook 2013, the autocomplete stream is stored as a MAPI property and can be modified using the MAPI or the
    PropertyAccessor object of the message. The PropertyAccessor object is exposed in the Outlook 2010 or Outlook 2013 object models.
    Outlook 2010 or Outlook 2013 reads the autocomplete stream from a message in the Associated Contents table of the Inbox of the mail account’s delivery store. This hidden message has a message class and subject of IPM.Configuration.Autocomplete. The autocomplete
    stream is stored on this message in the PR_ROAMING_BINARYSTREAM property (PidTagRoamingBinary Canonical Property).
    References:
    How to import .nk2 files into Outlook 2013
    Some Application which can read the Nickname Cache
    Interacting with the Autocomplete Stream
    Autocomplete Stream
    https://msdn.microsoft.com/en-us/library/office/ff625291.aspx
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Parse SQL: How to extract column names, table names from a SQL query

    Hi all,
    I have a requirement wherein a SQL query will be given in a text file.
    The text file has to be read (probably using text_io package), the SQL query needs to be parsed and the column names, table names and where clauses have to be extracted and inserted into separate tables.
    Is there a way to do it using PL/SQL ?
    Is there a PL/SQL script available to parse and extract column names, table names etc ?
    Pls help.
    Regards,
    Sam

    I think I jumped to conclusion too early saying it is completely possible and straight forward. But after reading through your post for one more time I realised you are not interested only in the column_names, also the table_names and the predicates .
    >
    SQL query needs to be parsed and the column names
    >
    The above is possible and straight forward using the dbms_sql package.
    I am pasting the same information as I did in the other forum.
    Check this link and search for Example 8 and .
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sql.htm#sthref6136
    Also check the working example from asktom
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1035431863958
    >
    table names and where clauses have to be extracted
    >
    Now this is the tricky bit. You can extract the list of tables by getting the sql_id from v$sql and joining it with v$sql_plan. But sometimes you may not get all the results because the optimizer may choose to refine your query (check this link)
    http://optimizermagic.blogspot.com/2008/06/why-are-some-of-tables-in-my-query.html
    and you can get the predicate information from the same table v$sql_plan but I will leave that area for you to do some R&D.
    Regards
    Raj
    Edited by: R.Subramanian on Dec 10, 2008 3:14 AM

Maybe you are looking for