Line number in a *.class file, please help, advanced language guys

dear all,
i use c++ to open a *.class file and try to read line number of code in the file, i have 2 questions:
1. i read line number in a method successfully, but i can not understand the meaning of start_pc, following are one of those data, please explain:
s = start_pc,n = line_number
s , n
0 , 123
8 , 125
23 , 126
29 , 127
34 , 129
38 , 130
2. i can not find where the class's line number are, i.e. class start line and class end line, or field's line number.
does these info exist inside a *.class file?
thx for any light

jdb gets line number of fields from class file, not
source file definitely.I'm not really sure how you tested this, but here's my test, and JDB definitely gets its listing from the source file.
First, I created and compiled class Tester:
public class Tester
    public static void main( String[] argv )
    throws Exception
        Tester x = new Tester();
        System.out.println(x.toString());
    int     x;
    int     y;
    private Tester()
        x = 0;
        y = 1;
}Then, I ran this in JDB. Note lines 16 and 17 in the output from "list":
H:\Workspace>jdb Tester
Initializing jdb ...
stop in Tester.mainDeferring breakpoint Tester.main.
It will be set after the class is loaded.
runrun Tester
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint Tester.main
Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
12            Tester x = new Tester();
main[1] list
8    {
9        public static void main( String[] argv )
10        throws Exception
11        {
12 =>         Tester x = new Tester();
13            System.out.println(x.toString());
14        }
15
16        int     x;
17        int     y;
main[1] quit
Tester@b82368Then I edited the source file. Again, look at lines 16 and 17:
H:\Workspace>jdb Tester
Initializing jdb ...
stop in Tester.mainDeferring breakpoint Tester.main.
It will be set after the class is loaded.
runrun Tester
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint Tester.main
Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
12            Tester x = new Tester();
main[1] list
8    {
9        public static void main( String[] argv )
10        throws Exception
11        {
12 =>         Tester x = new Tester();
13            System.out.println(x.toString());
14        }
15
16        int     a;
17        int     b;
main[1]

Similar Messages

  • MouseOver StaticText to run Complex Function in class file (please Help!)

    Hi, My current issue is this:
    I have a Function called "utptab(x)", where x is an integer. The process of the function isn't too important and is complex (it populates the type of table in the Basic pallete with data from a stored procedure in MySQL based on the parameter passed to it. This all works fine).
    Since the function is currently sitting in the main Java class (Page1.class) I can call it from anywhere in the main Java code successfully. For example, if I drag a button to the stage, then double click on it to get to actions and insert the line "utptab(2);" The function is successfully processed and the table (tbl_utp) is successfully populated with data.
    My aim: I have 2 static text box's called "st_utp1" and "st_utp2", When I mouse over them, I would like the function "utptab(x)" to be called with the appropriate number, eg, if mouse over "st_utp1" I wish for the function to be called as "utptab(1)" when over "st_utp2" I wish for the fucntion to be called as "utptab(2)". I may have hundreds or thousands of "st_utpx" (they will be created and named dynamically later).
    My Main issue: I can't call the function "utptab(x)" located currently in the Java side of "Page1.class" with a mouse over a static text event, does anybody know how?
    Ontop of this, I would also like to make the table (tbl_utpx) to move to the x,y position of the cursor on the screen and also render visible on mouse over the static text box and hidden on mouse out. (I already know one method for hidden/visible method).
    I would prefer to be able to handle mouse events in Java, not JSP or at least choose to hold my functions where ever I like and call them from where ever I like.
    Just one other question, since I'm using JSC2, Where should this procedure lie for best security and performance? The table only needs to be read only, and the data only needs to be available while a mouse over event happens (to me seems like it should be in the request scope). Should it be a seperate class file? If u need I can post the code on request but didn't want to draw away from my main issue.
    Cheers.
    P.S. it took me a long time to find out how to populate the basic table with a stored proc from MySQL (2 months), I haven't seen any other code to do this nor to populate from a tabular file, am I the only one to do this or wanting to do this? Does everybody that want's to do more complex things than pretty web pages use a different IDE than Creator 2?
    Once again looking forward to the response and sorry if I led away from the main question, which was: How to call a function that is located in a class file from another part of the program or another file?
    Cheers, from 3Pc
    Message was edited by:
    3Pc

    Cheers for the response, Tried that, couldn't get it to work, do u place taht code in the staticText onMouseOver property?
    Here is the basic code in the Java.class (what u get when you usually click the Java button)
    * Page1.java
    package a1;
    import    ...
    public class Page1 extends AbstractPageBean {
        public String utptab(int utp) {
            FieldKey[] fk = new FieldKey[0];
            RowKey[] rk = new RowKey[0];
            CallableStatement stmt = null;
            Connection conn = null;
            ResultSet resultSet = null;
            try {
                Class.forName("com.mysql.jdbc.Driver").newInstance();           
                conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/corrovu?user=root&password=Glancino");         
                stmt = conn.prepareCall("{call utpn(?)}");         
                stmt.setInt(1, utp);         
                stmt.execute();         
                resultSet = stmt.getResultSet();
                CachedRowSetImpl crs = new CachedRowSetImpl();
                getSessionBean1().setCrs(crs);
                getSessionBean1().getCrs().populate(resultSet);
                conn.close();
                getTableRowGroup2().getChildren().clear();
                getCachedRowSetDataProvider1().setCachedRowSet(getSessionBean1().getCrs());
                fk = getCachedRowSetDataProvider1().getFieldKeys();
                rk = getCachedRowSetDataProvider1().getAllRows();
                FacesContext ctx = FacesContext.getCurrentInstance();
                Application app = ctx.getApplication();
                ValueBinding vb = app.createValueBinding("#{currentRow.value['"+fk[0].getFieldId()+"']}");
                ValueBinding vb2 = app.createValueBinding("#{currentRow.value['"+fk[1].getFieldId()+"']}");
                getStaticText4().setValueBinding("text", vb);
                getStaticText5().setValueBinding("text", vb2);
            } catch (SQLException se) {
            } catch (Exception e) {
            return null;
        public String button1_action() {
            utptab(2);
            return null;
        public String button2_action() {
            utptab(1);
            return null;
    }You also need to add a property to SessionBean1 called crs, it be of type cachedRowSetImpl, now you need to drop in a cachedRowSetDataProvider, bind it to "crs" and have this as the data provider for the table, You will have to create at lest one column for it to register. (Creating Columns dynamically will be my next chanllenge after this).
    The JSP source is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <ui:page binding="#{Page1.page1}" id="page1">
                <ui:html binding="#{Page1.html1}" id="html1">
                    <ui:head binding="#{Page1.head1}" id="head1">
                        <ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
                    </ui:head>
                    <ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
                        <ui:form binding="#{Page1.form1}" id="form1">
                            <ui:button action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1" onMouseOver="form1.button1.click();"
                                style="left: 239px; top: 192px; position: absolute" text="Button"/>
                            <ui:button action="#{Page1.button2_action}" binding="#{Page1.button2}" id="button2" style="left: 47px; top: 192px; position: absolute" text="Button"/>
                            <ui:table augmentTitle="false" binding="#{Page1.table2}" id="table2" style="left: 72px; top: 216px; position: absolute; width: 360px"
                                title="Table" width="0">
                                <script....</script>
                                <ui:tableRowGroup binding="#{Page1.tableRowGroup2}" id="tableRowGroup2" rows="10" sourceData="#{Page1.cachedRowSetDataProvider1}" sourceVar="currentRow">
                                    <ui:tableColumn binding="#{Page1.tableColumn4}" headerText="tableColumn1" id="tableColumn4">
                                        <ui:staticText binding="#{Page1.staticText4}" id="staticText4"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{Page1.tableColumn5}" headerText="tableColumn2" id="tableColumn5">
                                        <ui:staticText binding="#{Page1.staticText5}" id="staticText5"/>
                                    </ui:tableColumn>
                                </ui:tableRowGroup>
                            </ui:table>
                            <ui:staticText binding="#{Page1.utp1t}" id="utp1t" onMouseOver="form1.button1.click();"
                                style="position: absolute; left: 72px; top: 72px" text="1"/>
                            <ui:staticText binding="#{Page1.utp2t}" id="utp2t" style="position: absolute; left: 168px; top: 72px" text="2"/>
                        </ui:form>
                    </ui:body>
                </ui:html>
            </ui:page>
        </f:view>
    </jsp:root>So I want when the Mouse is Over "utp1t" the Function "utptab(1);" to execute.
    Any Suggestions, it currently works correctly with button1 & button2.
    Cheers.

  • Lost unsaved Garage Band File - PLEASE HELP

    Lost unsaved Garage Band File - PLEASE HELP
    I had an audio file made on Garage Band but it was unsaved. I left my computer on at night and for some reason this morning my computer had seemed tor restart. I opened the garage band file but nothing came up.
    Is there any way I can recover this 'unsaved file'? It must be stored in cache somewhere.
    Someone please advise.
    Thanks.

    I would just like to say Thanks to HangTime up there. This trick worked 100% ... I had recorded 8 or 9 rather long tracks; for an unexpected reason (first time I've ever seen the "gray screen of death") the popup window came up and in several languages told me I needed to restart the computer; did what it told me to, begrudingly. Came back online, opened the GB file, nothing was there. Yet, when I checked package contents for the file (which I didn't even know existed, compartmentalized "Media", until after reading this), there were the tracks! I owe you both for getting this up and running... album creds just may be in line. ~Matt

  • I have purchased Production Premium CS4 Educational Version. Its serial number is not working. Please help...

    I have purchased Production Premium CS4 Educational Version. Its serial number is not working. Please help...

    If you recently purchased this then it is not likely to be a valid sale/purchase.  Adobe does not sell older versions of their products and no one but Adobe provides student/teacher licensing.  If you purchased this some time years ago and it is only recently that you find you are not able to reactivate it with the original serial number you can try contacting Adobe Support thru chat and see if they will be willing to work with you to resolve this.
    For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can

    I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can this is all new to me.

    Read this: iOS 4: Updating your device to iOS 5 or later
    ... oh I think it is a 3gs or a 3
    This makes a difference. What does it say in Settings > General > About?

  • How do I back up the music and apps etc. I restored my computer and I reinstalled iTunes, I was told something about a terminal command line, what does that mean? Please help

    How do I back up the music and apps etc. I restored my computer and I reinstalled iTunes, I was told something about a terminal command line, what does that mean? Please help

    - Transfer iTunes purchases to the computer by:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    - Transfer any other music by using a third-party program like one of those discussed here:
    Copy music
    - Connect the iPod to the computer and make a backup by right clicking on the iPod under Devices in iTunes and select Back Up
    - Restore the iPod from that backup. The restore will also update the iOS.
    Note that the backup that iTunes makes does not include synced media like apps and music
    Are you sure you have a 3G iPod? A 1G iPod can only go to iOS 3.1.3
    See:
    Identifying iPod models

  • HOW TO - Create new from clipboard and process multiple files - please help

    Need help - have new version of photoshop on trial only ATM...
    Want to know - HOW TO:
    1. Create new from clipbaord
    2. Process multiple files
    Please help.

    For clipboard copy, I start with File > New and the size will be set to what's in the clipboard. Then once the new file is opened, Edit > Paste will place the clipboard contents as a layer in the new document.
    You must remember to use the command Layer > Flatten Image of you want to save as jpeg or any other file format that doesn't support layers.
    For processing multiple files,
    File > Automate > Batch or
    File > Scripts > Image Processor...
    Check the User guide or google information for those commands if you have specific needs.
    Gene

  • Illustrator CS4 wont save files, please help?

    You can edit a file, go to save, close it down, then when you re-open it the changes made have not been saved?? No error message or warning pops up, and it all looks ok like it has saved properly, until you open it up again. This also happens when you use 'save as' command if you use the original file name. If however you type in a different file name - it saves ok. But obviously that is not great as you cant now trust or rely on the save mechanism of the programme, to make sure any changes to artwork have been stored!! I have never seen an issue like this, it is worrying, I hope somebody can help?
    Thanks.
    We are running CS4 on windows7 - yes PC!!!

    We save in EPS, and its not just one file, its a variety of different files and it seems to be random as to which files it does it on, some work fine - some don't. And it can be anything from a minor text change to a colour change, it doesnt seem to matter on the change made, it reacts the same.
    The files are saved over a network connection to a large external hard drive.
    Its really puzzling and now starting to cause problems as we do a fair bit of work in it, and can't trust one of the most important features, and that any changes that have been done have been saved and stored!
    Hope maybe you can help with any thoughts at all.
    Cheers.
    Date: Thu, 24 Jun 2010 03:41:40 -0600
    From: [email protected]
    To: [email protected]
    Subject: Illustrator CS4 wont save files, please help?
    What file format do you save it in?
    What kinds of changes did you make in that file?
    Where do you save the file (removable or network media)?
    >

  • How to view corrupted word files, please help?

    Can't view doc corrupted file .How to recover unsaved documents WORD? how to view corrupted word files, please help

    It could be Word or even Windows that is having the problem. Before you start trying to restore a backup or repair a file, try opening other documents.
    Try opening your "corrupt" document from another computer. Also you can try to make a copy of corrupted files. (It could work) : http://www.filerepairforum.com/forum/microsoft/microsoft-aa/word/968-i-would-be-grateful-for-any-help-to-repair-or-the-procedures-word-files
    But if nothing helps, you can try to recover it by using DOCX Viewer Tool Download free demo versions of this software from website: http://www.docx.viewertool.com/ It’s
    gonna help.

  • I try to download abode acrobat xi pro from abode download asssistant,it shows download is completed.but iam not able to get thet downloaded file,please help me

    i try to download abode acrobat xi pro from abode download asssistant,it shows download is completed.but iam not able to get thet downloaded file,please help me

    oatgeo wrote:
    I  checked the proxy and it should be OK. That's mean I have to try and try again until I get it from the slow servers.
    Yes.

  • Can anyone knows how to fix back camera having pink lines when i use it so please help me  thank you

    can anyone knows how to fix back camera having pink lines when i use it so please help me  thank you
    <Email Edited by Host>

    You're welcome.
    The 6.1.4 update had nothing to do with this. If it did, then every iPhone with 6.1.4 installed would have the same problem.
    Apple doesn't support downgrading the firmware, which won't change anything.
    If an Apple Store is miles away, then call AppleCare.

  • I can't cancel my creative cloud membership.Links and phone number don't work. PLEASE HELP, I WILL NOT PAY THE NEXT INVOICE!!!

    I can't cancel my creative cloud membership.Links and phone number don't work. PLEASE HELP, I WILL NOT PAY THE NEXT INVOICE!!!

    This is an open forum, not Adobe support... You need Adobe support to cancel a subscription
    -start here https://forums.adobe.com/thread/1703848
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html
    --and two links which may provide more details, if the above links don't help you
    -http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html

  • My iPad 4 tried to open application but repeatedly iCloud asked for login with apple id password. I put my apple id password correct,even i reset it again but still it does not accept in iPad .i am bored with this 3rd class application.please help

    My iPad 4 tried to open application but repeatedly iCloud asked for login with apple id password. I put my apple id password correctly,even i reset it again but still it does not accepted in iPad .i am bored with this  class application.please help.After every 1 second icloud logoin asked.

    Find Apple ID
    https://iforgot.apple.com/applied
    iPad: Unable to update or restore
    http://support.apple.com/kb/ht4097
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694
    If you can’t update or restore your iOS device
    http://support.apple.com/kb/ht1808
     Cheers, Tom

  • Hi all I am from India,I purchased whatsapp application on14th July for Rs.55 but they charged me Rs.60 for that and also yesterday again they charged Rs.55 for the same app..what should I do??Please help me out guys..

    Hi all I am from India,I purchased whatsapp application on14th July for Rs.55 but they charged me Rs.60 for that and also yesterday again they charged Rs.55 for the same app..what should I do??Please help me out guys..

    Have you added or changed your credit card details on your iTunes account ? If you have then each time that you do so a small temporary store holding charge (the Rs 60) may be applied to check that the card details are correct and valid and that it's registered to exactly the same name and address as on your iTunes account - it should disappear off your account within a few days or so.
    Store holding charge : http://support.apple.com/kb/HT3702
    For the second charge for 55, you used the same account to re-download the app ? If you did then you can contact iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Please hep to generate same line number to print in file

    Hi
    I am generating file by taking data from few tables. I need to generate file data from below structure data :
    i.e In table A for order O having product p1,p2,p3,p4, lines will be wrriten to file in following manner
    Line Number
    O -p1 - 1
    O -p2 - 2
    O -p3 - 3
    O -p4 - 4
    Now another line is from table which will have only two product entries for the order O in below manner
    i.e In table B for order O having product p2,p4. so for this lines should be match with above line number of order like this :
    Line Number
    O - p2 -2
    O - p4 -4
    First all data from table A will be writeen. Then only from TABLE B data should be wrriten to file.
    Can anybody please help how to match line number for both the tables?
    Thanks in advance

    Perhaps a clearer output would be if we had different descriptions on each of the tables A an B to output with each of the rows..
    SQL> ed
    Wrote file afiedt.buf
      1  with A as (select 1 as order_id, 'p1' as product_id, 'A - order 1 product 1' as descr from dual union all
      2             select 1, 'p2', 'A - order 1 product 2' from dual union all
      3             select 1, 'p3', 'A - order 1 product 3' from dual union all
      4             select 1, 'p4', 'A - order 1 product 4' from dual union all
      5             select 2, 'p1', 'A - order 2 product 1' from dual union all
      6             select 2, 'p2', 'A - order 2 product 2' from dual union all
      7             select 2, 'p3', 'A - order 2 product 3' from dual)
      8      ,B as (select 1 as order_id, 'p2' as product_id, 'B - order 1 product 2' as descr from dual union all
      9             select 1, 'p4', 'B - order 1 product 4' from dual union all
    10             select 2, 'p3', 'B - order 2 product 3' from dual)
    11  -- end of test data
    12  select order_id
    13        ,product_id
    14        ,row_number() over (partition by order_id order by product_id) as line_number
    15        ,descr
    16  from A
    17  union all
    18  select order_id, product_id, line_number, descr
    19  from (
    20    select b.order_id
    21          ,b.product_id
    22          ,row_number() over (partition by a.order_id order by a.product_id) as line_number
    23          ,b.descr
    24    from A left outer join B on (a.order_id = b.order_id and a.product_id = b.product_id)
    25    )
    26* where order_id is not null
    SQL> /
      ORDER_ID PR LINE_NUMBER DESCR
             1 p1           1 A - order 1 product 1
             1 p2           2 A - order 1 product 2
             1 p3           3 A - order 1 product 3
             1 p4           4 A - order 1 product 4
             2 p1           1 A - order 2 product 1
             2 p2           2 A - order 2 product 2
             2 p3           3 A - order 2 product 3
             1 p2           2 B - order 1 product 2
             1 p4           4 B - order 1 product 4
             2 p3           3 B - order 2 product 3
    10 rows selected.
    SQL>

Maybe you are looking for

  • Need Help To Extract Logo from Flash File .swf

    I have an attached Flash file that is in .swf format. There is a N64 logo within this file that I'm trying to extract as a .png with a transparent background. I've been able to open it in a program called Flash Decompiler Trillix and in the sub-menus

  • Problem in PA30 with custom infotype

    Hi, I created a custom infotype 9001 and i  want to check the correctness of the infotype in PA30 but when enter the personnel no and infotype as 9001 and click on create it goes to short dump and an error arises "Dialog module "RP_9001 " not found".

  • Problem using owa_util.redirect_url

    I thought I could use the following to branch. However it does not work. Is there anything else I should be doing to make this work declare begin owa_util.redirect_url('f?p=294:20'); end; Howard

  • Error font in menu walman of sony sp

    error font in menu walman of sony sp

  • Adobe Help Manager

    Has anyone found a way to bypass the need to use Adobe Help Manager to download the PDF help files? I've wasted far too much time trying to get this to work.