Display which method called the method (gives you a headache doesn't it)

Hi,
This question might sound a little weird, so maybe read it twice:
I would like to see which method called the method.
public void test1()
   test2();
public void test2()
   System.out.println(....);
The program output should be, test1 or classname.test1 or something like that. Is that possible?
Thanx in advance, Yvo van Beek

This should give you an idea:   public static void main (String args[]) {
      wereAreWe();
      caller2();
    public static void wereAreWe() {
      try {
        throw new RuntimeException("here we are");
      catch (Exception ex) {
        System.out.println("");       
        ex.printStackTrace(System.out);
    public static void caller1() {
      wereAreWe();
    public static void caller2() {
      caller1();
    }You can parse the result of printStackTrace() to get a more precise output.

Similar Messages

  • My iPod 5's screen displays strange letters (like the one's you'd find in a malfunctioning computer) and it has a bright rectangle in the center. I haven't dripped or damaged it.

    My iPod 5's screen displays strange letters (like the one's you'd find in a malfunctioning computer) and it has a bright rectangle in the center. I haven't dripped or damaged it.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

  • Which object called the method

    Suppose there is a class A which has three objects a1,a2,a3 and a method m. Now I'd like to know which particular object has called the method m.

    >
    which particular object has called the method
    What class called my method
    http://developer.java.sun.com/developer/qow/archive/104
    a.The advice in the posted link is unreliable as the format of printStackTrace() is not standardized. A more reliable way to find out the calling class is to use SecurityManager.getClassContext() or Throwable.getStackTrace() [in JDK 1.4+].
    However, it is not clear whether the original poster wanted to know the calling class or the calling object. In the latter case there is no easy way except for modify the signature of method m to accept the reference to the calling object.
    Vlad.

  • Ideas to display which component drives the other components in the canvas

    I have 4 components in my canvas and I would like to learn some ideas from gurus on what are the best ways to display which component drives (drills down)  the other components in the dashboard.  Any info would be appreciated.

    Hi,
    There is no such rule on which component should drive other in Xcelsius. It all depends upon the data that you are using. Always a component with summarized data should drive a component with granular data. For eg: If you are showing Total sales in a country using Column chart and want to drilldown to the percentage of sales in each region of a particular country , you can use pie chart to show it. Here Column chart drives Pie chart and u can show this in other way also.
    Hope it helps!
    Thanks,
    Arun US

  • What bookmarks does the firefox give you when you download firefox?

    I am not sure how but all of my mozilla firefox bookmarks were erased. I do not know if I will ever need them but I would like to put them back in case I do. Thanks

    Hi Dennis,
    Firefox does not really include much in the way of bookmarks when you initially download it.
    *What did you have a set of bookmarks on another version of Firefox ?
    *and was that on the same or a different computer ?
    * Presumably these were bookmarks that you saved yourself ?
    If you have been using Firefox for a while or have imported bookmarks from some other browser then you will have a collection of bookmarks, that Firefox stores in a folder and set of files called the profile.
    If you update Firefox. Or if you uninstall it (without explicitly deleting the profile) and reinstall again Firefox looks for and trys to provide the previous bookmarks and history.
    What has happened have you reinstalled Firefox on a new computer ? <br> if so see
    * [[Restore bookmarks from backup or move them to another computer]]
    Otherwise maybe these are appropriate
    * [[Import Bookmarks from an HTML file]]
    * [[Recover lost or missing Bookmarks]]
    If you try to provide a bit more information about what happened maybe I will be able to give better advice. I am not sure at the moment exactly what your situation is ragarding any previous bookmarks.

  • Weird font is displayed which screws up the web page layouts

    When I view certain pages, such as this one, much of the text, normally text that would be in h1, h2,h3 tags is displayed in a weird block font that looks terrible and is almost impossible to read. An Example screenshot is here : http://i39.tinypic.com/2drz96x.gif. Please help me, I've tried clearing cache, uninstalling/reinstalling, deleting full directory, etc.
    == URL of affected sites ==
    http://

    '''Michael Taylor'''
    This issue can be caused by the bitmap version of the Helvetica or Geneva font or another (bitmap) font that can't be displayed by Firefox in that font size.
    Firefox can't display that font in the specified size and displays gibberish instead.
    You can test that by zooming out (View > Zoom > Zoom Out, Ctrl -) to make the text smaller.
    Uninstall (remove) all variants of that not working font to make Firefox use another font or find a True type version of that font that doesn't have the problem.
    See http://kb.mozillazine.org/Issues_related_to_fonts#Gibberish

  • The "Print what you like" bookmarklet doesn't work since the upgrade. When you click it, nothing happens.

    I use a program called "print what you like", and I have a bookmarklet installed for it. So when I'm on a page I want to use the program on, I click the bookmarklet and a sidebar window opens allowing me to modify the web page, etc. to how I want it before I print it. Now, when I'm on a page I want to use it on, when I click the bookmarklet, nothing happens. Some small text briefly appears about javascript??? but then disappears. So now I can't use the program.

    Do you have javascript enabled in Firefox? To use bookmarklets, that is necessary.

  • Which method do you prefer for laying out a site?

    Hi
    i know tables are old now, but i know that its good for all
    round compatibility.
    Is it true that using layers to create a website is a bad
    idea?
    Do i need to really start learning how to type more in code
    mode? and start using DIV tags? And if i do need to start using
    DIVS is it important that i get Fireworks 8 for this?
    Thank you

    > Is it true that using layers to create a website is a
    bad idea?
    Yes. In my opinion, it is.
    > Do i need to really start learning how to type more in
    code mode? and
    > start
    > using DIV tags?
    Yes, but don't restrict it to <div> tags. What you
    really need to learn is
    this -
    http://www.projectseven.com/tutorials/css/qdmacfly/index.htm
    http://www.macromedia.com/devnet/mx/dreamweaver/css.html
    http://www.macromedia.com/devnet/dreamweaver/articles/tableless_layout_dw8.html
    http://www.macromedia.com/devnet/dreamweaver/articles/css_concepts.html
    http://apptools.com/examples/pagelayout101.php
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Simon2k7" <[email protected]> wrote in
    message
    news:etuif3$bes$[email protected]..
    > Hi
    >
    > i know tables are old now, but i know that its good for
    all round
    > compatibility.
    >
    > Is it true that using layers to create a website is a
    bad idea?
    >
    > Do i need to really start learning how to type more in
    code mode? and
    > start
    > using DIV tags? And if i do need to start using DIVS is
    it important that
    > i get
    > Fireworks 8 for this?
    >
    > Thank you
    >

  • Everytime I open Safari I get a message that says the "Safari version you are using doesn't support the Community Toolbar."  Does anyone know what this means?

    Everytime I open Safari I get a message that says "we're sorry but the Safari browser version you are currently using does not support the Community Toolbar." Does anyone know what this means?

    Have a read at this thread https://discussions.apple.com/message/15620421#15620421 with similar problem and a solution.
    Stefan

  • What WPF method gives the same KeyChar like in C#?

    in C#  there's a method KeyChar. when inserting a key in to a textBox it gives the value that was insert. for ex. when clicking on:5 the method gives: 5.
    but Wpf doesn't have the KeyChar method.
    i tried to use Key but then it gives me for ex. when i click: 5, i get: 5D5.
    what method can i use to get the KeyChar like in C#?
    or, maybe there's no such method and then i'll have to build one as an extension?

    >>what method can i use to get the KeyChar like in C#?
    There is no KeyChar property in WPF. WPF is not Windows Forms. If you handle a keydown event there is only the Key property and this returns for example Key.D1 when you press a digit.
    You could easily remove the "D" or the "NumPad" part using the string.SubString method though:
    private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
    string number;
    if ((e.Key >= Key.D0 && e.Key <= Key.D9))
    //digit pressed!
    number = e.Key.ToString().Substring(1); // = "1" when D1 is pressed
    else if (e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9)
    number = e.Key.ToString().Substring(6); // = "1" when NumPad1 is pressed
    else
    //no digit...
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and please start a new thread if you have a new question.

  • Which method to reinstall a clean version of Mavericks?

    I'm getting thoroughly confused as to the method(s) afforded to me to reinstall Mavericks cleanly. My machine came pre-loaded with 10.9.0. Since buying a new customised iMac four weeks ago I've been struggling not only with a blurry display but also with myriad bugs. I've been so busy with all of that that I've not had time yet to acquire and install my own additional apps. I've tried one Mavericks update, from the Apps Store, bringing it to 10.9.2 but it made zilch difference to any of my problems.
    Using the Web to bone up on how to download a fresh copy of Mavericks and then to put it on to a bootable USB drive has revealed that there are several methods for doing this. However, each involves multiple procedures and if you don't do them just right you risk ending up with a dead machine. But amongst the many articles I looked at was this:
    http://www.macworld.com/article/2056561/how-to-make-a-bootable-mavericks-install -drive.html
    in which Dan Frakes states in a section called 'A note on installer compatibility' that owners of Macs that came with Mavericks pre-installed aren't allowed to download a new copy of Mavericks with which to do as they wish. Instead, only an 'Internet Recovery' install is permitted.
    Then, on these forums I've seen reference to this, which seems to suggest that a copy of Mavericks, other than the one being used, is stored on the Mac and simply needs to be envoked:
    http://support.apple.com/kb/ph14243?viewlocale=en_US
    Errh, or does it?
    Going back to the macworld article, is Frakes's contention true? Could I only envoke an Internet Recovery (and that only), where presumably all control will taken away from me and a download-and-install done all in one operation? (There might be issues in my case, as my internal HD's partitioned).
    I've of course been doing Time Machine backups along the way but TM backups will only deal with the system disk's contents as delivered initially, including any bugs or damaged files that might have been there at that time. Only a clean install of some kind, from a newly-acquired copy of the Mavericks file, will be the sensible thing to do, therefore, if I want to try the fix the current problems with my Mac.
    But then there's the Apple Support note about using Recovery for reinstalling the OS. What makes this different to an Internet Recovery? In this case, is Recovery done from a good copy of Mavericks stored on the Mac (seems very unlikely), or is this in fact the same as Dan Frakes's Internet Recovery, except that the Apple Support note doesn't go on to say that the Internet will be automatically accessed?
    Has anyone using these forums been in this situation yet and discovered the ins and outs of trying to download and install a clean version of Mavericks, when the current OS on their Mac is already Mavericks?
    Going to the Apps Store (at which I've registered) and looking up the description of the Mavericks Installer file there, a small button on the webpage indicates that it's free and, certainly in my case, there's no wording there to indicate that I'll not be permitted to download it. But perhaps that won't happen until I actually try to do it?!

    Kappy,
    Sorry I've not responded for a few days. I've been busy with important issues outside of computing.
    I've read your response many times over and although I still find it confusing, it appears that at long last you're beginning to agree with me - that machines that already have a copy of Mavericks pre-loaded are a special case, in that with them you can't just go to the OSX Mavericks Installer at the Apple Store and download the file there, with a view to performing a reinstall of it and/or to make a bootable copy of it, and then expect it to work. Instead, the only options available are to use what's called 'OSX Recovery', or 'Internet Recovery', two mechanisms that are especially built into the Mavericks Mac itself. Now, I might still have got this wrong but I think that the former will restore a copy version of Mavericks on the machine as loaded by the factory (not from Time Machine), whereas the latter will specifically download a new copy of Mavericks from a dedicated Apple server (not the same file as found at the Apps Store). Either mechanism will require the Internet to be accessed.
    From all of the research on this that I've done by looking through other postings in these and other forums, there's widespread misunderstanding of this, in my opinion. From what I've read, I think the majority who've written about it have got it wrong and only one or two have realised that, for current post-Mavericks machines, what you're actually permitted to download is quite limited and specific. Indeed it's very easy to get this so wrong that if you attempt it without truly understanding it you can easily end up with a dead machine and no copy at all of Mavericks! Both OSX Recovery and Internet Recovery require the system disk to be erased before the replacement copy of Mavericks is added to it, but if something goes wrong with the download, for example, or you find you're not permitted to download the file anyway (because you've requested the wrong Mavericks file), you've basically had it!
    Why on earth Apple has devised such a complex mechanism in the first place is quite beyond me. I can only presume that, because hard install media (CDs, DVDs) has now been consigned to the past, Apple's become paranoid about the possibility of people downloading copies of the OS to put on their own media and it then possibly getting illegally distributed. But Mavericks is hardly likely to work on a non-genuine Apple machine anyway, and Mac-ers are allowed to now update from earlier versions of the OS for free, so where's the problem? I just cannot fathom why Apple doesn't simply provide a ready-made USB memory stick with a copy of the OS on it when someone buys a Mac. There are surely ways of locking the stick both to keep it safe from erasure or corruption and to associate it, by way of serial.no., with only a specific machine?
    Anyway, back to the problem in hand. My understanding - and I'll be the first to hold up my hands and admit that I'm a complete idiot if I'm wrong - is that post-Mavericks machines (such as mine) incorporate a normally-hidden zone on the system drive (or system partition) that holds: a presumed good copy of Mavericks, a Disk Utility, a minimal form of the Safari browser, and the Restore mechanism for Time Machine. If, therefore, you wish to reinstall the OS from this copy, then you would envoke specifically OSX Recovery. You'd type Cmd + R during a restart. You'd need to assume that the copy of the OS (not the copy you've been using) is therefore good and totally uncorrupted (which it might not be!), but at least this recovery method should be relatively fast. My guess is that the Internet access requirement for this is purely for authorisation purposes (reading the machine's serial no. and doing a quick check on the hardware) and nothing else.
    Incidentally, for both recovery methods, Apple strongly advises that you ensure that your router is configured to DHCP. Look very carefully in:
    http://support.apple.com/kb/ht4718
    I assume this is because of the simplified nature of the Internet access by the minimal browser contained in the Recovery zone and also the presumed minimal status of the Network software on the machine. This unfortunately will mean a separate and very awkward additional task for those of us who are not using DHCP. And then a repeat of that later on, to put the router back to its normally-required state. Jeez, all this palaver just to try to end up with a decent copy of the OS on the machine!
    My understanding is that OSX Recovery renders you effectively an on-machine backup copy of Mavericks but with all your files and settings remaining intact. (At one stage I had a suspicion that the backup copy was a download from an Apple server, but now I'm not so sure and instead I think it's from a copy of the OS kept in the Recovery zone on the HD from Day One). Bear in mind that if the Recovery zone, or specifically OSX Recovery, has become corrupted or there are bad files amongst the copy OS, all you'll end up doing is putting another corrupted version of Mavericks back. There's really no substitute, in my view, for a proper clean install, and so for this you need to envoke Internet Recovery instead, the alternative mechanism.
    Internet Recovery follows a similar procedure, except that you use Cmd + Option + R during the first restart. You follow the instructions through, and before Recovery attempts to connect the machine with the Apple server you're required to wipe the entire system drive. Unfortunately if you've partitioned your system disk, then this will cause a problem, possibly causing the procedure to freeze (see the above kb article). So you've no real option but to save any precious files in them and to delete those partitions beforehand, reconstructing them later on, when hopefully the full Internet Recovery will have succeeded. After the server performs a couple of checks on your machine the 'guaranteed clean' version of Mavericks is then downloaded, straight into the system drive, along with a copy of the Recovery zone. My assumption is therefore that the Internet Recovery download will be at least 13GB, if not more. OSX Recovery, by comparison, should be in the region of 6GB. Anyone on a slow Internet connection will therefore experience some very frustrating hours, if not days, waiting for the Internet Recovery download to complete. Even after that there'll be many minutes before the whole process ends and the machine finally boots back up into the Welcome screen.
    Incidentally, Apple seem to say that the version you're given in the download is the version found already on the machine. So, if you've originally had 10.9.0 and you've in the interim updated to 10.9.2, does the server give you 10.9.0 again, or 10.9.2? I guess it doesn't matter too much, as you're probably going to want to download the updates and any missing iLife apps again anyway - but it'd be nice to know early on. Another ambiguity, in my view.
    Looking back at your last statement in your posting of 25th March, Kappy, what you've written there is of course true  - you're not permitted to download the Mavericks Installer file from the Apps Store, and that any other non-legitimate copy elsewhere on the hard drive will ultimately fail - but with an important caveat: Yes, you're not permitted to download Mavericks from the Apps Store in that instance, but you are still permitted to get a different and bigger file (the 'full' file which includes all of Recovery) from a different Apple server elsewhere. And that's Internet Recovery.    
    Now, do tell me, have I understood this properly? If you reckon you're truly up to speed on this and you think I'm still wrong over one or two things, do point them out.
    Actually, when I performed my recent update to 10.9.2 the screen went blank halfway through the download and remained so for some time. (The download took over 30 mins). It did nonetheless appear to complete. However, my working copy of Mavericks now seems even more buggy than the version supplied on the machine originally. So, this is why I'm seriously contemplating a full clean install now (Internet Recovery). At the time of the update, my router was configured to be using fixed addressing, not DHCP, so possibly that caused a big hiccup in the download. Somehow, I can't believe that that would be a requirement for everyday updating of the OS and apps, though. That'd be ridiculous.

  • Which method ???

    Hi
    Planning a upgrade of a 4.6C system to 6.40, i have to decide which method to use concerning zero interactive CPW model 590. Which method are the most common or which method do you prefer?
    1:  Carry out the upgrade in the background as described in Note 86557
    2:  Use the Upgrade Assistant; both the upgrade in server mode and the UaServer can be started as background jobs. It is important that you correctly set the environment variables as they are set for the interactive operation and the CPYENVVAR(*YES) parameter for SBMJOB.
    3:  Start the upgrade from the Upgrade Assistant GUI.
    I'm not a big fan of JAVA performance on system i !!!!!  
    Mfg Mads Hammer

    Hi Mads,
    I always use option 1 )
    btw: I would never go for 6.40 but for 7.00 now !
    Regards
    Volker Gueldenpfennig, consolut.gmbh
    http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

  • "Display Extr. Calls" use

    Hi all,
    I am developing some extractors, for me this is the first time, I wrote the code and it works fine, but when I test it using RSA3 the extracted records are repeated according to the value I put into parameter "Display Extr. Calls", this is right? The BW consultant for which I am developing say that parameters would indicate only the number of package for displaying.
    For example, if the extractor finds 100 records and I put 10 into "Display Extr. Calls", the result is 1000 records divided in 10 pacakge; what the BW consultant would expect instead is 10 package with 10 records for each one...
    what is right? Do I have to change something?
    thanks
    GN

    Data Records / Calls --> this gives the number of records fetched in the first open cursor.
    Display Extr. Calls --> this gives the number of packages shown (and the extraction stops).
    so, if you expect to extract 100 records, and you put as above, you will have 1 package with 100 records.
    If you expect to extract 1000 records, and you put as above, you will have 10 packages with 100 records.
    the first parameter says how many records will be in the package, the second only says how many packages are retrieved for testing. if youi leave the first parameter and only change the second one, this has no impact on the number of records in the package.
    M.

  • I purchased an iPad mini on October 10th.  I want to return it and get the new ipad mini retina when it comes out.  How do I do that if the new ipad mini release date isn't until "later in November", which is beyond the 14 days from my purchase date?

    I purchased an iPad mini on October 10th.  I want to return it and get the new ipad mini retina when it comes out. I am currently still within the 14 day return/exchange window but how can I exchange it if the new ipad mini release date isn't until "later in November", which would be beyond the 14 days from my purchase date?  If apple announces a new version of a product you just purchased but won't actually release it for more than 14 days, how can you possibly exchange the one you just bought?  Is my only option to return the one I bought on the 10th (so return by 10/24) and then not have an iPad until the new one is available for purchase?  Or would it make any sense to return the one I bought, get a new one, which would presumably have another 14 day return window, and then exchange THAT one for the new ipad mini w/ retina when it comes out (hopefully within that second 14 day window)?

    Call the apple store you got it from and ask them. Sometimes in the past they've extended the 'no questions asked return' but only Apple can tell you for sure.

  • How to identify which UIcomponent called generic ValueChangeListener? HELP

    Using Jdev. 11.1.1.2.0
    In my jsff I've got an af:iterator that layout components. Each of these component uses the same generic ValueChangeListener.
    In the ValueChangeListener I want to check which component did the change - and for some components issue a PartialTrigger command.
    Problem is; How do I know which component called the listener? I'm not in control of the component Id - so I can't use this. I'm not able to dynamically bind to BackingBean UIcomponent. The ClientAttribute works for af:input but not for af:selectOneChoice...
    Any ideas?

    Hi,
    af:iterator stamps its children, which means that there are no individual component instances created. To PPR a component you refresh the base component (the one that gets stamped). In your case, go with John Stegeman's recommendation or use af:forEach if you need individual component instances to be created. Event then however, John's suggestion will work best
    Frank

Maybe you are looking for

  • Error while Deleting Software Component

    Hi All, I am getting following error while deleting Software Component Version: Unable to Delete object DELETEDEMO_COMPONENET, 1.0 of delete. You cannot delete a sotware component version if it contains imported interfaces. Is there any shortcut isnt

  • How to apply patch 118833-36 on a containerized server?

    We have a V890 running Solaris 10 that has two zones (containers) running instances of Oracle database. `smpatch' won't install patch 118833-36 in the normal manner because it's flagged as an interactive patch. The recommended procedure is to shut th

  • My photos has gone missing. How can i get it back?

    The pictures on my iphone 5 have gone missing. i dont know what happen to it but the pictures what was on my old phone has now replaced it which were the pictures that i dont want. how can i get my pictures back ? Please help me

  • Need Bootable XP Image/Disk from my z61m

    I did not receive Win XP installation disks with my z61m. Now I need either the bootable XP system or the XP image to use in a vitual machine partition on a mac computer to run my Window apps...The app is asking for the XP installation disk, so I am

  • Resrict update to upper case in Employee Self Service

    Is there a way to restrict employees to update their personal information using upper case in Employee Self Service?