How to restart swing application by using shotcut key (ex :CTRL+ALT+ENTER)

Hi,
Currently my swing application freezs some times, it will not come back, only option i have is restart.
Can some one can help me how i can implement short cut key (CTRL+ALT+ENTER) that can restart my application. (in any state, my action should allow to restart).
Thanks
Anjan
Edited by: 807057 on Nov 2, 2010 9:16 AM

Currently my swing application freezs some times, it will not come back,I would work on fixing that problem. Sounds like you aren't using Threads properly and are blocking the EDT. Read the section from the Swing tutorial on [url http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html]Concurrency for more information.
how i can implement short cut key (CTRL+ALT+ENTER) that can restart my application.Within Swing this would be done by using "Key Bindings". A section on Key Binding is found on the tutorial link from above. However, is Swing actually is frozen then this won't work.
Therefore this would need to be done at the OS level, which java doesn't support. You would need to use JNI, which I know nothing about.

Similar Messages

  • How to get web application to use Tuscany without conflicting with SAP SDO

    Hi,
    We are attempting to run a web application on SAP NetWeaver CE 7.1 SP1 which uses Tuscany SDO.  As it now stands We must use Tuscany because the web application will not run with the SAP SDO implementation provided by Netweaver. To ensure that Tuscany is loaded with priority, we have packaged the Tuscany JAR files and their dependencies as a heavy resource, as described here:
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60642a88-95fe-2b10-d387-a245d48fc257?overridelayout=true
    The final check showed that Tuscany was correctly deployed as a heavy resource and included the following JAR files:
    common-2.2.3.jar
    ecore-2.2.3.jar
    ecore-change-2.2.3.jar
    ecore-xmi-2.2.3.jar
    tuscany-sdo-impl-1.1.1.jar
    tuscany-sdo-lib-1.1.1.jar
    tuscany-sdo-tools-1.1.1.jar
    xsd-2.2.3.jar
    We also verified that the web application using Tuscany has a hard reference to the Tuscany heavy resource.
    However, when we try to run the web application, the following error is logged:  java.lang.LinkageError: Class commonj/sdo/DataGraph violates loader constraints
    The issue is definitely due to some kind of classloading conflict with the SAP SDO library, as the application runs normally when SAP SDO is manually removed from the classpath. Doing this on a production system is unfortunately not an option, though.
    So the question is: how to get web application to use Tuscany without conflicting with SAP SDO?

    I took a look at the "printerReady" example.  Looks like I may be able to use the InetPing (...) function to ping through a range of IP addresses looking for a response.
    Any ideas on how to find the MAC address associated with the IP addresses that respond?
    We may have multiple units responding and the MAC address will allow the operator to determing which unit to connect to.
    I'll try the InetPing to see how it works,
    Kirk

  • How to restart an application

    My fellow WD explorers,
    Can anybody please tell me how to restart a WD application?
    What I want is the following: if I'm on a certain view within a WD application and want a button which should start the application again from scratch...
    So, everything should be initialized as if the application was started for the 1st time.
    Thanks in advance for your recommendations.
    Wouter Heuvelmans

    Hi
    The best thing you can do is you create an exit outbound plug to your window
    and give the parameter Url of type string and give your application name while
    firing the outbound plug.
    this method is used to get the url of your application
    CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
    application_name = '<your application name>
    IMPORTING
    out_absolute_url = lv_url.
    /people/thomas.szcs/blog/2006/07/18/basic-concepts-150-url-semantics
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7015b1f9-535c-2910-c8b7-e681fe75aaf8
    Regards
    Abhimanyu L
    Message was edited by:
            Abhimanyu Lagishetti

  • How to restart single application server(ABAP Stack)without effecting users

    Hi Experts,
    I Want to restart  one application server(ABAP Stack) in my clustered environment with out effecting endusers. I believe can be done it by transfering users request to other application servers. Please let me know the steps to perform this activity.
    Cheers
    DV

    Hi,
    Yes, you need to wait for the users to disconnect from the app server and remove the server from the logon groups.
    You should also remove the batch processes with an operation mode switch.
    Beware also if you have HTTP applications and you use a web dispatcehr for load balancing.
    Regards,
    Olivier

  • How to configure ADF application to use OAM Identity Assertion ? web.xml

    We have a web application developed using ADF (application development framework) and deployed on WebCenter 11.1.1.2 (weblogic 10.3.2)
    OID Authentication and OAM identity assertion is configured in WebLogic 10.3.2 .
    How to configure security in ADF application (web.xml or weblogic.xml) so that it uses OAM identity assertion (already configured as authentication providers in weblogic server)
    Any pointers or documentation so that application (developed using ADF) check for identity tocken and verifies it with one of identity assertion providers.

    John,
    I have to concur. With OAM you don't need this. OAM intercepts the calls and inserts a cookie for WLS to get user information from.
    I strongly advise to go through the above mention OFM Security Guide. Esp. Chapter 10 tells you in every detail how to implement OAM SSO with WLS (with or without OHS as a proxy).
    Reading this chapter saves you time and turnarounds on this topic...
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to populate an application item using ONCHANGE.

    I am trying to populate an application item, TAB_INSTATE using an onchange command. I cannot figure out how to do it. Does anyone know the syntax, or can you point me in the right direction. I am unfamiliar with javascript and have been relying on previous examples, posts. thanks
    apex_item.select_list_from_query
    (20,
    c020,
    'select partner_name, partner_abbrev
    from partners
    where state_code is not null order by partner_name ',
    'style="width:100px"'
    || 'onchange="'
    || CASE
    WHEN :p300_authorization1 = 1
    THEN 'f_set_casc_area(this,f21_'
    || LPAD (seq_id, 4, '0')
    || ');'
    ELSE
    <THIS IS WHERE I WOULD LIKE A THE VALUE OF c020 TO BE PLACED INTO :TAB_INSTATE>
    END
    || 'f_set_casc_subarea(this,f22_'
    || LPAD (seq_id, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select State -',
    'f20_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO'
    ) in_state,

    Hello Karen,
    >> I am trying to populate an application item, TAB_INSTATE using an onchange command.
    I believe I answered you in here - Re: once more...4 cascading LOVs, 3rd is hidden 4th no longer works However, for future reference…
    You don’t have a direct access to an application item, using JavaScript, because application items don’t render on page. You can, however, using the AJAX framework to do that, using the add() method. The generic code I’m using is the following:
    <script type=”text/JavaScript”>
    function setSessionValue(pItem, pValue) {
      var get = new htmldb_Get(null,html_GetElement('pFlowId').value,null,0);
      get.add(pItem, pValue);
      get.get();
      get = null;
    </script>This code can set any page or application item value.
    Regards,
    Arie.

  • How to restart Air application

    I have the following questions any help would be appreciated.
    1. Is there a way to restart Air application
    2. How to get application directory path
    3. How to get application executeable name i.e.
    (myFlexApp.exe for windows)
    Thanks in advance.

    I know air application has .air application, but after
    installing the air application its extension is no longer ".air"
    for windows its extension become ".exe" for mac and linux it is
    some thing else.
    secondly global Object Application has limited functionality
    it doesn't provide the path of directory where application is
    installed and complete name of application with extension, someone
    can change the executable file name manually in installed
    directory, in that case Application.application.name + ".exe"
    doesn't work....

  • How to switch off the computer using the key on the keyboard?

    Hi,
    i've been using Mountain Lion for a while on my MBPr and when I wanted to switch off my mac, I used the key on the dashboard, then it asked me whether I wanted to switch off, restart or go on sleep mode... Now though with Mavericks, this button only makes it go on sleep mode...how to change the function of this key, in order to switch the computer off instead of sleep mode or how to get the window asking me what to do back?
    Thanks,
    BadGoldEagle

    It's a laptop, and when I don't use it i put it in a case and hide it (I've been burgled several times and I don't want to lose my Mac...
    About my friend: He was using his laptop when he had to go out (groceries....) and because he was in bed, he left it under his blanket to hide it form view... he put his computer to sleep. Unfortunately, windows update noticed something needed to be updated and switched back on the computer and during the update, it became kinda hot and it burned the CPU... bad...
    You'll understand I don't want to do that to my mac...
    And now all i have to do is wait 'till Apple brings an update to fix that...

  • How to set swing to support using vrml/external/browser ?

    When doing applets with AWT to call vrml/external/browser.getbrowser, it works. But if update to use swing instead of awt, applets always cannot say: java.lang.NoClassDefFoundError: vrml/external/Browser.
    The html file containing this applet is converted by command : java HTMLConverter **.html .And also using java1.3.1plug-in.
    But if removing java plug-in and add ---ARCHIVE="Swing.jar"---- into **.html source code without using java HTMLConverter. The applet works.
    While, this way can let applet work, but thus, the applet cannot connect to mysql database.
    So, anyone knows how to set up swing in applet when using converted **.html with javaplugin? ???
    Thanks so much!!!!

    Hi David,
    Need more info:
    Version of Crystal Reports are you using?
    Visual Studio version?
    Try with this:
    The following C# code demonstrates the use of the ExportToStream method:
    ReportDocument report = new ReportDocument();
    report.Load("c:\\temp\\test.rpt");
    ExportOptions options = new ExportOptions();
    options.ExportFormatType = ExportFormatType.PortableDocFormat;
    options.FormatOptions = new PdfRtfWordFormatOptions();
    ExportRequestContext req = new ExportRequestContext();
    req.ExportInfo = options;
    Stream s = report.FormatEngine.ExportToStream(req);
    Response.ClearHeaders();
    Response.ClearContent();
    Response.ContentType = "application/pdf";
    s.Seek(0, SeekOrigin.Begin);
    byte[] buffer = new byte[s.Length];
    s.Read(buffer, 0, (int)s.Length);
    Response.BinaryWrite(buffer);
    Response.End();
    Regards,
    Shweta

  • How to define the application to use for opening each file type (pdf, jpg,...)

    I installed an external application, and this new application has been configured by defect that it will be used to open all files with extensions like jpg, pdf, etc...
    I want to revert this situation and define again the proper application I want to use for opening each file type. How can I do this in Lion?
    Thanks,
    Azaldier

    Pick a representative file.
    Get info. (Command-i)
    There you will see a place "Open with" where you can select the application for that file.
    Hit the "Change all..." button to do this for all files of this type.
    charlie

  • How to restart java application

    Hi ,
    I have an application which have some parameters ( These parameters are configured in APP )
    I want if the config values changes then our application should be restarted .
    How can I do it programmitically
    Thanks and regards
    Anshuman

    Let your program detect the changes and exit with a defined return code.
    If the running script detects the Java program's having stopped with this return code,
    it restarts the program.

  • How do i see how much storage each application is using?

    my mac gave me a warning that it is nearly out of storage.  I have 500GB internal storage which i am surprised i am almost out of.
    i use a DSLR camera which takes up a lot of storage with each picture but i am still surprised.  how can i see how much each application is taking up in terms of storage? 
    Thanks.

    First, empty the Trash if you haven't already done so. Then reboot. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation. You also need enough space left over to allow for growth of your data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    To locate large files, you can use Spotlight. That method may not find large folders that contain a lot of small files.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) to explore your volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    Install ODS in the Applications folder as usual. Quit it if it's running.
    Triple-click the line of text below to select it, then copy the selected text to the Clipboard (command-C):sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The application window will open, eventually showing all files in all folders. It may take some minutes for ODS to list all the files.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with ODS, quit it and also quit Terminal.

  • How to Integrate Dynpro Applications without using Local DCs

    Hi,
         I am facing problem in Integrating Local DCs, we are not using DTR. What we have done is, developed our projects using Local Development Components and copied all this into one system and added to the Used DCs, and deployed all the Local DCs into the J2ee Server. It is deployed but giving Runtime Error.
    Can anybody help us in this regard, we want to know the complete procedure involved in this.
    thank you,

    Hi Ludo,
    I followed the
    Developer Guide: Smartphone
    Mobiliser Applications
    Sybase Mobiliser Platform 5.1
    SP03
    Document, but  some where i am getting errors , here are the screen shorts what i did step by step ..
    so can you guide me how to resolve these issues ..
    Thanks,
    Vamsi

  • How to i allow applications to use push notifications?

    I just got my first iphone.  Excitedly, i downloaded a ton of apps.  I didn't know what push notifications were, so i didn't allow any of these new apps to use push.  how do i go back and allow push in apps?

    Thanks.  I think I have a handle on pushes now.  Originally, I totally missunderstood what "push" meant in this context.  I thought it meant aps would send me more notifications than normal.  Not that it referred to the technology of how the notifications got to my phone.
    I have also downloaded the manual... which is way more helpful than the tiny pamphlet that came with the phone!!

  • How to restart Java Application from state when system crash

    I want to know about the API that provide mechanism to save your program state peroidically or any specific task completed of application and if system crash and next time when application restart it should be started from previous state.
    I required solution urgently plz. replay as soon as possible

    write it yourself.
    Serializable Interface, FileOutputStream, ObjectOutputStream ... that'd be a start for you.

Maybe you are looking for