Modifying library source code

I need access to the code internal to the Swing library. I've written a complex program that is exhibiting some strange behavior, and the best way at this point to debug it is to insert some trace statements into some of the repaint routines so I can see what it's trying to do.
I've already downloaded the sources from the JDK. How do I generate an executable that uses a modified version of one or more Swing classes? I'm developing with Eclipse.

jschell wrote:
So what do you think that the second will do that the first will not?It's reasonable of you to ask. And I hope my answers appear reasonable to you. I welcome your input. If you think there are other things I should be considering, tell me, but please don't flame me.
There are two factors that are pushing me to this approach. The first is that the bug appears on the computer of another user, but I'm unable to duplicate it on my own machine. This user has been very cooperative in helping me work on the problem. The approach that has worked so far is that I've modified the program to put trace info into a circular buffer, and after the bug hits the user emails me the contents of the buffer.
I've already had one session where I use remote desktop software to watch the program running on the user's computer. It's cumbersome, but I can go back to it if necessary. If I were to rely on using Eclipse to trace into the program, it would mean I would need to install an entire development environment onto the user's computer. It's possible, but I'd like to avoid it if I can.
The other factor is the nature of the bug itself. The program relies on multi-threading to analyze and display audio in real time. The bug never shows up initially -- it usually needs about two or three minutes of continuous operation before it shows up. So far I don't have a clue about what triggers the transition from normal operation to bad. What I've determined so far is that the AWT-Event-Queue is getting backed up. Events are being added to the queue faster than they can be dealt with. When things get bad, it may take several seconds for the program to respond to a mouse click. By dumping stack traces at intervals, I find the program is spending most if its time inside the RepaintManager. Now that I have the tools, I'd like RepaintManager to report what it thinks needs repainting. RepaintManager gets called thousands of times, and I don't know at this point if I simply breakpoint once whether or not I'll find anything relevant. If I don't, I'll have to start the process all over again.
I realize the second factor is not as strong as the first. I could probably find a way to use the Eclipse debugger. But if I can rely on trace statements, I don't know of a strong reason not to.

Similar Messages

  • Modify javadoc source code

    Hello :-)
    I would like to use javadoc to read comments inside the methods, but i know there is no such thing in javadoc now so i am thinking either to implement this feature myself or find other documentation generators to use. Does anyone has any good ideas on how to do it???
    Have anyone done such thing already? I know i can get javadoc source code from tools.jar, butt confused on how to modify it and build it or making the jar on that... Thanks a lot....

    Hi,
    Check the below note 872892 gives you step by step procedure of how to do the changes.
    The below links will be of help to understand the concepts:
    http://help.sap.com/saphelp_nw04/helpdata/en/1c/ccabc5ef780f4cb5be6b9624b077cd/frameset.htm
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417400%29ID0042988250DB11232412343044179198End?blog=/pub/wlg/7177
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0b1f2c8-54e0-2910-9ab3-b85f15093655?prtmode=navigate
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/a5214174abef23e10000000a155106/content.htm
    Cheers-
    Pramod

  • Why are the Java Library source code classes not indented properly?

    I have always admired the design of a lot of classes and frameworks in the JDK. I read the source code a lot to see how the developers coded a particular class, how they designed it and how they write the javadocs.
    But one thing I observed was the improper indentation of the source code. Why is this so?

    I have always admired the design of a lot of classes
    and frameworks in the JDK. I read the source code a
    lot to see how the developers coded a particular
    class, how they designed it and how they write the
    javadocs.
    But one thing I observed was the improper indentation
    of the source code. Why is this so?Repeating what was said above....do not look upon the Java API as an example of how to do anything, not for design, not for code implementations and not even for code structure.

  • How do I clear permissions for SCC VIs? I am trying to modify the source code.

    I'm trying to use SCC protected VIs in a new project, but original permission has been lost. I'm using Labview 7.0 that does not have the SCC option.

    Hello,
    I'm not sure I understand the question... What are "SCC Protected VIs?" And where are you looking for an SCC option in LV 7.0?
    Sincerely,
    Sean C.

  • Is there a way to decorelate annotations from the source code?

    sorry : the title of the question may sound bizarre but , not being a native speaker, I do not know how to precisely state my problem.
    I'll try:
    an example: suppose you want to annotate your code with annotation such as @MightBeNull (a fictitious annotation) to mark a field as being potentially null.
    this annotation is going to be used by annotation processor X and is specified by (fictitious) library org.something.staticcheck ...
    Now if a new (and better) tool appears for the same purpose you'll have to change your code. At compile time your code is dependent on a precise library (and a set of precise tools for annotation processing).
    I my dreams I would like a way to write my own annotations and configure an adapter that redirects to the precise library that I choose at given moment.
    For sure that cannot be so easy since adaptations could not fit easily (but let's forget it for the moment).
    This seems impossible ... or it is?
    ( a better way could be to annotate not the source code itself but a separate description of its features that could be annotated independently)

    Sorry bruce I am a bit slow: I don't understand your suggestion.
    if I have a code like that:
    import org.staticcheck.annotations.MightBeNull ;
    public class Thing {
           @MighBeNull private Something relation;
    }my code is dependent on library "org.staticcheck.annotations".
    then afterwards if I change for another tool that uses annotation
        com.newprovider.annotations.CouldBeNullI am obliged to modify my source code!
    I daresay I am tempted by hacks such as :
    import com.mybusiness.annotations.MetaAnnotation ;
    public class Thing {
           @MetaAnnotation("null_possible") private Something relation;
    }and then perform some precompile wizardry (thru a preprocessor ;-( or tricky annotation processor
    that transforms the source code). But it could turn out ugly/clumsy ....
    that means that there will be a resource for describing a "translation" from the MetaAnnotation to the
    real thing needed at a precise moment.
    So my question is: has someone found a way to do that elegantly? (btw I can think of many more reasons for this decorrelation between
    the source code and its annotations).

  • Unable to edit WebDynpro source code after import from NWDI Track

    Hi !
    I am facing an odd issue when trying to modify the source code in a web dynpro that is in a Track.
    This is what happens:
    I create the project from Inactive DCs
    I double click in the component controller (for example) and try to enter a line of code
    A pop ups appears saying that in order to modify the file I have to check it out and to create an activity
    The window to create a new activity appears, and I create the new activity
    I am informed that the file to be edited will be included in the activity
    --- Until now everything is normal ---
    A try again to type something inside the source code.. and NOTHING happens, is as if my keyboard was broken.
    After trying 1000 things I found a workaround that is:
    Open the DTR perspective in NWDS, go to inactive -- <project>.. gen_wdp , ( and in gen_wdp right click, edit --> subfolder tree).
    After doing that I am able to edit the source code... this is very strange! I mean, I never had this problem before..
    somebody has a hint ?
    Best regards!
    Marco.

    hi,
    I am able to edit the code is one of the DCs in the same track and I am unable to do so in the other. The error that I see in a popup while trying to edit the code is :
    The operation can only be performed if the following objects are writable:The project is not in the repository, but there are some read-only files
    Component Controller com.aramco.sao.had.hmd.dcsa.newagrcomp.NewAgrComp
            Read-only: D:\Users\bohramx\Desktop\nwds-extsoa-7.3-SP02-PAT0001-win32\eclipse\workspace.jdi\1\DCs\aramco.com\it\ca\esales\web\newagrmnt\_comp\src\packages\com\aramco\sao\had\hmd\dcsa\newagrcomp\NewAgrComp.wdcontroller
    Please suggest how to checkout files for edit.
    Thanks!
    seventyros

  • HotSpot source code explanation

    Hi!!
    I am new in this, so I will try to be as clear as I am able :)
    I need to modify the source code of the hotspot, and I do not find any information about the meaning of each file in the directory tree. I have tried to do it by myself, but it is a bit complicated for me ;P
    Any suggestion, WP, idea or anything about the meaning or the content of each file (as many as you can) will be of a huge help :D:D:D
    Thx!! :D:D:D:D

    Hi!!!
    I am doing a project about improving certains features in the JVM ;) so I need to modify the source code of the hotspot :)
    Thx!! :D

  • Hotspot source code

    Hi,
    We want to make a comparison between the source code of the Hotspot JVM v1.4.2 and the source code of Hotspot v1.6 (to analyze the system calls which are made by Hotspot under Linux when using the threading API).
    However, the former seems not to be available since the JVM became Open Source after the release of the 1.4.2 version...
    Is it possible to download the sources of Hotspot v1.4.2 somewhere? Is it possible/necessary to ask Sun to obtain these sources?
    Thank you in advance,
    Fred

    Hi!!!
    I am doing a project about improving certains features in the JVM ;) so I need to modify the source code of the hotspot :)
    Thx!! :D

  • Java Library classes source code

    Hi all,
    Does anyone know where I could find source codes for java library classes. The ones that i am especially interested in finding are the inputStream, inputStreamReader, and BuferedReader classes.
    Thanks and regards,
    Green

    Does anyone know where I could find source codes for
    java library classes. The ones that i am especially
    interested in finding are the inputStream,
    inputStreamReader, and BuferedReader classes.http://java.sun.com/j2se/downloads/index.html

  • Netbeans 4.1 Recompiling even if the source code is not modified

    I am new to NetBeans 4.1
    So Please guide me
    I have 300 Java Source files
    I installed Netbeans and have my source code in Netbeans But as soon as I run Executable.java It compiles all the files and Runs it
    But afterwards when I run that file again it again compiles all the files which unneccasirily wastes Time
    Is It proper
    I think it should check for modified files and then compile
    Please help me regarding this
    Bye for now
    CSJakharia

    One other thing to note: you may want to subsrcibe to the mailing list: [email protected] That list is a focal point for the NetBeans user community.
    Continuing this thread in this forum might not be as effective as starting a new thread on that list.
    vbk

  • How to obtain source code of weka and enable to modify it

    hello,
    how to obtain source code of weka and enable to modify it such i want to extract code of some process that I make

    Hi ENG,
    Since the issue regards to Weka. It is out of the support boundaries of our forum, I suggesT you post the question in the following forum:http://forums.pentaho.com/forumdisplay.php?81-Pentaho-Data-Mining-WEKA.
    It is appropriate and more experts will assist you.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to modify source code on website

    I would like to view and modify source code for my website on the iphone. I have an app that allows me to FTP the files to my server. But, I don't know how to view code in Safari and be able to modify it. Can you tell me how to do that?
    Thanks!

    See also:
    *Firefox > (Web) Developer > Page Source
    *Tools > Web Developer > Page Source (Ctrl+U)
    *right-click on a web page and select View Page Source in the context menu

  • Network Java Native Library libnet.jnilib source code or functions name

    Hi,
    I am using libnet.jnilib in my networking project but i am not aware about the internal structure of this library. Is this open source library? Is oracle JNI project open source as jdk? If It is, Where can i get source code for that? If It is not, Can u help me to get the methods name and signatures for the libnet.jnilib library?
    Thank you,
    Gaurav

    You're looking in the wrong place, so it's pointless. You can't get any information about what the TCP/IP stack is doing at the network layer or what the NIC is doing at the physical layer from Java's native code. All it does is call the C Sockets API. It is essentially part of the application, not part of the operating system or network layer or physical layer, and it doesn't know any of those from Adam.
    You need to attach some drivers into the network stack to get that kind of information. All that you could get by instrumenting Java's native networking code is the flow of data into and out of the application, and you can get that via network stack drivers too. You should also have a look at the several implementations of Jpcap.

  • Modify source code for Active-X viewer

    Requirement:
    Whenever an ActiveX viewer is selected, and a report link is clicked, the control goes to Url - CeVwr which is a servlet pointing to ReportSourceBridge.java residing in reportsourcebridge.jar. This class alongwith all other classes present in this jar pop up the parameter screen and process it to display report. Our requirement is to dynamically prepare this parameter screen, by localizing the strings - parameter prompts and their options - based on user's locale.
    Reason for workaround:
    BO does not provide any source code for Active-X viewer but they do for DHTML and Advanced DHTML viewer. So it was easy for us to implement our requirements in DHTML and AdvDHTML viewers but for Active-X viewer it is not the same story.
    Workaround:
    We identified a core class ParameterHTMLRenderResult.java present in rascore.jar, which is the one which genrates HTML for parameter prompt screen for all viewers, accept for the Java one. We extracted all parameters, their descriptions, their prompting options as well as current values and modified the html result to get a localised HTML result. We also passed user's locale in this class.
    Question: Is the source code for Active-X viewer available? Is it okay for us to modify Active-X viewer?

    Hi Chris,
    We do not provide the activex viewer code and do not support modifying it or any of our other code.
    Code for those two other viewers is available since they are html based viewers so that code is easily obtainable, but we do not support customers making changes to it.
    Jason

  • How to use Source Code Control for Large Application?

    Hi, All!
    I would like to collect knowledge about "best practice" examples for using Source Code Control and project organization for relative large application (let's say approx 1000 SubVIs).
    Tools used:
    LabVIEW 8.0
    CVS Server
    PushOK CVS Proxy Client
    WinCVS
    With LabVIEW 8 we can organize large project pretty well. This described in article Managing Large Applications with the LabVIEW Project.
    I have read this article too: Using Source Control Software with LabVIEW In this Article Source Safe used, but with PushOK all looks nearby the same and works (some tricks for compare function are required).
    Example. Two developers working together on same project. Internally project is modular, so one developer will work with module "Analysis", and another one with "Configuration" without interferences. These modules placed into Subfolders as shown in example above.
    Scenario 1:
    Developer A started with modification of module "Analysis". Some files checked out. He would like to add some SubVIs here. So, he must also perform check out for the project file (*.lvproj), otherwise he cannot add anything into project structure.
    Developer B at the same time would like to add some new functions into module "Configuration". He also needed to check out project file, but this file already checked out by Developer A (and locked). So, he must wait until lvproj file will be checked in. Another way is mark *.lvproj files as text files in PushOK, but then one of developers will get conflict message by checking in and then merging will be necessary. This situation will coming very often, because in most cases *.lvproj file will be checked out all the time.
    Question: Which practice is better for such situation? Is Libraries better than folder for large project?
    Scenario 2:
    Developer C joined to the team. First, he must get complete project code for starting (or may be at least code of one Library, which assigned to him).
    Question: How it can be done within LabVIEW IDE? Or WinCVS (or other SCC UI) should be used for initial checkout?
    Scenario 3:
    Developer D is responcible for Build. Developers A,B,C have added lot of files into modules "Analysis", Configuration" and "FileIO". For building he need to get complete code. If our project splitted into folders, he should get latest *.lvproj first, then newly added SubVIs will appear in Project Explorer, then he should expand tree, select all SubVIs and get latest versions for all. If Project organized in Libraries, he must do the same for each library, isn't?.
    Question: Is this "normal way", or WinCVS should be used for this way? In WinCVS its possible with two mouseclicks, but I prefer to get all code from CVS within LabVIEW IDE recursively...
    That was a long post... So, if you already working with LabVIEW 8 with SCC used for large project, please post your knowledge here about project structure (Folders or Libraries) and best practices, its may be helpful and useful for all of us. Any examples/use cases/links etc are appreciated.
    Thank you,
    Andrey

    Regarding your scenarios:
    1. Using your example, let's say both developers checked out version 3
    of the project file. Assuming that there are only files under the
    directories in the example project, when Developer A checks in his
    version of the project, there will be new files in one section of the
    project separate from where Developer B is working. Developer B,
    notices that there is now a version 4 of the project. He needs to
    resolve the changes so will need to merge his changes to the latest
    version of project file. Since the project file is a text file, that is
    easy to do. Where an issue arrises is that after Developer B checks in
    his merged changes, there is a revision 5. When Developer A and B go to
    make another change, they get the latest version which will have the
    merged changes to the project file but not the referenced files from
    both Developer A and B. So when A opens version 5, he sees that he is
    missing the files that B checked in and visa versa. Here is where the
    developers will needs to manually use the source control client and,
    external to LabVIEW, get those new files.
    Where libraries help with the above scenario is that the library is a
    separate file from the project so changes made to it outside of the
    project do not require the project to be modified. So this time, the
    developers are using a single project again which time time references
    two libraries. The developers check out the libraries, make changes to
    the libraries, and then check those changes in. So when each developer
    opens the project file, since it references the project file, the
    changes to the library will be reflected. There is still the issue of
    the new files not automatically coming down when the latest version of
    the library is obtained. Again, the developers will needs to manually
    use the source control client and, external to LabVIEW, get those new
    files. In general, you should take advantage of the the modularity that
    libraries provide.
    2. As noted in the above scenario, there is no intrinsic mechanism to
    get all files referenced by a LabVIEW project. Files that are missing
    will be noted. The developer will then have to use the source control
    provider's IDE to get the initial contents of the project  (or library).
    3. See above scenarios.
    George M
    National Instruments

Maybe you are looking for

  • LG MAXIMO ONE can't install Adobe Air

    Hi Actually my problem is simple. I can't install Adobe Air Runtime in my device because I can't find it. I've search for Air Apps in the Market and install a few. In the opening screen they all ask to install Adobe Air, when I search it just isn't f

  • Will adobe acrobat 9 run on windows 7 64 bit

    will adobe acrobat 9 run on windows 7 64 bit home premium

  • Can't read opened attachments in emails

    When I try to open an attachment received in an email, I get a "notepad" sheet filled with unreadable gobbledegook! Does this mean I will never be able to open attachments sent from Windows users in emails? (probably no great loss) or have I not down

  • WRT150N needs to be reset every week

    WRT150N V1.1 Firmware 1.01.9 On average once per week all of the devices in the house can no longer connect to the WRT150N. Unplugging the WRT150N for 30 seconds and replugging it in invariably solves the problem. My WRT54 did this too, but I figured

  • HT5503 Whats the best way to free up space on the iphone 3gs

    I can't update my iphone with the 6.0 because I don't have enough memory. Whats the best way to free up space? I have already deleted some pictures and music..