Prevent JVM from exit on Windows with an Atl-F4

The "Alt-F4" key combination can be used to kill my Java program.
Would anyone know of a way to prevent this?
Since this only needs to be stopped on Windows and the
application does bundle the "JRE" with it (we therefore
control which version of Java we are using). I was thinking
of trying to use the sun.misc.SignalHandler to intercept what
I assume would be the SIGINT or SIGTERM associated with
the "Alt-F4".
Has anyone else done this?

Actually I do use JNA to capture and forward the keyboard events. The JNA keyboard hook however
does NOT see the Alt-F4 sequence. (My guess is the OS's handler get it first).
I was instead hoping to capture the SIGINT or SIGTERM event (I'm not yet sure what it is) to prevent it
from shutting down the JVM.
Edited by: asnyder on Nov 24, 2009 5:03 PM

Similar Messages

  • I'm getting this error: It looks like you've the new version of Firefox. Unfortunately, there is currently a bug that is preventing players from playing Java games with version 3.6.14 of Firefox.

    cant play on Pogo.com, error: theres a bug that prevents everyone from playing Java games with Firefox new version.

    You can update Firefox to the latest 3.6.15 version via "Help > Check for Updates"

  • How to prevent B1 from populating the grid with components?

    Hello group,
    We have customized a form that pops up when user enters a parent item (of a template-type BOM) in the quotation grid.  The form displays the component items and lets the user mark which items to "paste" onto the quotation.  However, B1 automatically populates the grid with the component items once focus moves away from the item code column. 
    <b>How to prevent B1 from populating the grid with components <i>while</i> retaining the parent item in the item code column?</b>  I've tried trapping the Validate event, etc. with no success.

    Instead of setting the parent item up as a template type BOM, you could set up the list of parent/child items on a user table and use this user table to display the items in your pop-up screen.  As the parent item would no longer be a template BOM, Business One would no longer automatically popuplate the grid, and you could write your own code to add only the items selected in your pop-up screen into the grid.
    John.

  • Switching from Mac to Windows with no CD

    Yes, I too fell in love at first sight with the nano, and will be giving my mini to my boyfriend (who got it for me in the first place). He uses PCs and Windows.
    I did a search on reformatting the mini from Mac to Windows but all the answers seemed to involve installing the iPod for Windows software. I don't seem to have this anymore, and Apple helpfully doesn't provide it for download.
    Sooo...how is my boyfriend to reformat my mini for PC? Will just plugging it into a machine loaded with iTunes for Windows do it?
    Sorry if this is an often asked question; maybe what I should be asking is where or whether I can get the iPod for Windows software. Will whatever is provided with the nano work for the mini on a PC?

    Download the latest version of iTunes and the iPod software updater onto the PC. Install iTunes, then the iPod software updater. Then run the iPod software updater, connect the mini when told, and choose to restore.

  • Mx.core.Window - prevent user from closing the window?

    Hi,
    mx.core.Window has properties 'maximizable' &
    'minimizable', but there doesn't seem to be any 'closable'
    property. In my application I'm creating another window (apart from
    the main application window) that needs to be open the whole time
    the application is running. If I can't prevent the user from
    closing the window, then I'll have to rig up some code to
    automatically re-open it if the user closes it. I'm hoping there's
    a way to prevent the user from closing the window in the first
    place though.
    I'll much appreciate any ideas - thanks :)

    Listen for the window's closing event and call
    preventDefault().

  • Prevent PDFs from Changing Adobe Window Size & Position

    Some PDF files have embedded codes to change the size and / or position of the Adobe (or Reader) window. This is a very irritating "feature" and is completely unnecessary, at best. I have looked through the various Preferences setting but nothing seems to address the problem. How do I prevent this from happening?
    Thanks.

    Thanks guys. Is there a way to prevent this action globally, i.e. for all documents, rather than just document-by-document after the fact? Any well-designed software would have a way to prevent documents from messing up my screen configuration, so I assume someone at Adobe had the wherewithall to have that as an option in Acrobat.

  • Run multiple apps from one browser windows with 9ias r2

    We are running 9ias r1 with forms 6i as our production server. Users are able to access one html page with multiple links to their applications. They can run one application, keep it running, navigate back to the html page and run a second application.
    We are testing 9ias r2 with forms 9i, but when users try to navigate back to the html page to run the second application the first application closes.
    Is there a way to have 9ias r2 work the same as r1 and allow users to run multiple application from one html page?

    Hi,
    Thank you for posting in Windows Server Forum.
    You can take rdp of server 2012 R2 from Fedora Linux desktop by running Yum command or Gnome rdp support. Please check below article for information.
    1.  How to Use Remote Desktop (rdesktop) in Redhat/Fedora/CentOS
    2.  Remote desktop from Linux to windows using rdesktop and gnome-rdp
    3.  XRDP Installation: An Easy Remote Desktop Setup for Linux
    Note:
    Microsoft is providing this information as a convenience to you.
    The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • Permit internal Read Receipts but prevent them from exiting organisation

    http://blogs.technet.com/b/exchange/archive/2011/02/23/3412028.aspx
    Above article explains how to delete Read Receipts in Exchange altogether.
    Can I use Exchange to allow Read Receipts between internal users within the organisation but prevent read receipts from being sent to external mail addresses? Case in point is to prevent spammers from confirming live addresses within the organisation.
    So we want to know if anyone has read our emails; we want to know if we've read each others emails and if the outside world has read our emails but we don't want the outside world to know whether we've read their emails.
    I'm getting the impression that the functionality supported in Exchange means that you can only configure a rule like this on a separate gateway (front end?) if you want only external affected and you cannot specify the direction (i.e. allow incoming read
    receipts but delete outgoing read receipts).

    Hi,
    From your description, you want to prevent the external users from receiving the read receipts of internal users.
    You can create the following transport rule to achieve it. (Note: Because we use the "Read" as subject key word, it will delete the messages whose subject contain "read", please pay attention to use it.)
    What's more, I have a test in my lab. If I choose "Read:" as subject key word, the transport doesn't work. When I choose "Read" as subject key word, it works.
    Besides, to force an immediate update of transport rule, you can stop and start the Microsoft Exchange Transport service.
    Hope it helps.
    If you need further assistance, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • How come I am not able to prevent Firefox from allowing popup windows even after I enter the website address under Security?

    I have been using Firefox on a Mac computer for a number of years and have been happy with it. I have recently gone to a different trading platform called Trademonster.com and am having issues with its operation. When I call Trademonster, they told me that my Firefox must allow pop-up windows to operate. I do notice that when I log on to Trademonster on Firefox, it does say ".. Firefox prevented 2 pop-up windows from opening". I have gone to Preferences and under Security entered trademonster.com as a site to have access but I am still getting the signal that Firefox is preventing popup windows from coming up on the trading platform.
    PLEASE HELP.
    Thx.
    P. R. Patel

    Mac uses the Menu bar and doesn't have the Firefox menu button.
    You can inspect and manage the permissions for all domains on the <b>about:permissions</b> page.
    *https://support.mozilla.org/kb/how-do-i-manage-website-permissions
    You can inspect and manage the permissions for the domain in the currently selected tab via these steps:
    *Click the "Site Identity Button" (globe/padlock) on the location bar
    *Click "More Information" to open "Tools > Page Info" with the Security tab selected
    *Go to the Permissions tab (Tools > Page Info > Permissions) to check the permissions for the domain in the currently selected tab
    Delete the permissions.sqlite file to reset all permissions.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox

  • How to prevent settlements from AE to wbs with different company code

    Hi gurus,
    i'm currently facing a problem regarding settlements from activity elements to wbs above.
    we have one controllign areas with various company codes.
    For some projects, we have wbs assigned to company code A and activity elements assigned to Company A and B.
    We have an automatic settlement rule generation so that we settle all activity element costs to wbs. But, for activity elements assigned to company B, we don't want to settle the costs, we want to go through a sd/mm invoicing between the two companies.
    How can we prevent the settlement to take place, apart from manually removing the settlement rule for each activity element?
    can we put a validation rule that check that whenever the company code in the wbs is different from the one in the activity element, then the settlement doesn't take place? or remove the automatic settlement rule generation and use cjb1 to generate settlement rules only when an activity element as the same company code as the wbs above. would it be possible?
    would the WBS_SETTLEMENT_RULE BADI or badi proj be of any help?
    Any help is welcome.
    regards
    tim
    Edited by: Tim Ursulet on Jan 22, 2009 5:29 PM

    Hi Tim,
    The transaction CJB1 or CJB2 creates the settlment rules for WBS only, therefore the transactions and Badi WBS_SETTLEMENT_RULE BADI are NOT relevant for the settlement rules of activity and elements at all.
    For the settlement rules of activity (and elements) the default rule is inserted, as soon as the user navigate to the settlemenent rule overview screen, if the activity do not have the settlement rule at that time. I am not sure, if there is BaDi or substituation to prevent the system apply this default rule in certain case. Other alternative is to specify the objects during settlement,  e.g. using selection variant with the company code.
    Kind regards,
    Zhenbo

  • Why wont firefox let me acces any microsoft websites preventing me from activating my windows

    wenever i try 2 activate my windows it is telling that it cannot find my net connection, also wen i try to view websites relating to microsoft or any form of internet security firefox tells me that it is unable to access or locate the website!

    Maybe Norton support suggested this, but just in case...
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    Alternately, you also can clear Firefox's cache completely using:
    orange Firefox button (or Tools menu) > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now"
    If you have a large hard drive, this might take a few minutes.
    (2) Remove the site's cookies (save any pending work first). While viewing a page on the site, try either:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    In the dialog that opens, you can remove the site's cookies individually.
    Then try reloading the page and logging in again. Does that help?

  • Windows update prevents me from upgrading to Windows 10

    From what I understand, I won't be able to get the Windows 10 upgrade without downloading all the past Windows updates first.  The problem I'm having is, whenever I do, my computer reboots to nothing but black screen with flickering cursor, which causes me to do a hard reboot and then a system restore.  I've had this issue for months with windows update and haven't been running them, but now,  it seems if I want Windows 10, I don't have a choice.  Please help!

    Additionally, I tried the official Media Creation tool that I downloaded from Microsoft but that just tells me "Something Happened" Installation halted.

  • How can I prevent sites from opening private windows?

    Many websites, such as Moodle (classroom tool) and YouTube try to open certain new content, especially Google-hosted content, in private windows. In may cases, such as YouTube comment panes, there is now way to avoid this, and even if there is I forget sometimes.
    Private windows clog up my Recent Windows history, which I depend on for things like keeping my webcomics organized, and cannot be merged into normal windows in order to prevent this. As a result, if I don't want to do a great deal of of tab reorganizing every day, I can't use any of these sites.
    Please tell me how to either disable site-opened private windows, or close private windows without them appearing in my Recently Closed Windows list. Better yet, make the latter a permanent part of the browser; a private window that leaves no traces isn't much good when a snooper can simply reopen it.

    I assume that you mean pop-up windows that might be left unnoticed when they are opened behind the current Firefox window.
    You can modify the behavior and change these prefs to open all links in tabs:
    *http://kb.mozillazine.org/browser.link.open_newwindow<br />1: current tab; 2:new window; 3:new tab;
    You can change the value of the browser.link.open_newwindow.restriction pref to 0 to open all JavaScript window.open() calls in a tab
    *http://kb.mozillazine.org/browser.link.open_newwindow.restriction
    You can open the <b>about:config</b> page via the location bar and accept the warning and click "I'll be careful" to continue.
    *http://kb.mozillazine.org/about:config

  • Starting JVM from C++ via JNI with specified java.library.path switch...

    Please how i can pass java.library.path switch to JVM during JVM creating in C++...????

    Check out this tutorial: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html
    Do a search for the word 'Djava.library.path'
    fitz

  • Prevent Someone from closing window

    I am currently filling out a form on safari and there is no option to save my work so I will have to leave it up on the screen all day. My younger sibling use the computer too and have already accidentally closed it and have started over 2 times. Is there a way I can prevent someone from closing the window or lock it in any way????

    Hi
    Welcome to Apple Discussions
    No way to lock-in a window, however, if you have administrative control of the system, you can set up a separate user account for others (System Preferences>Accounts). This way, only you have access to your files etc. in your User Account, while affording others the same in their user account.

Maybe you are looking for

  • Problem with 2gb Corsair ram on MSI Diamond plus mobo

    Ok first of all,the specs: AMD Athlon 64 X2 4200+ "Manchester" MSI MS-7100 K8N Diamond Plus, nVidia nForce4 SLI MSI GeForce NX7900GTX-T2D512E 2048 MB DDR-RAM, 400MHz - (TWINX1024-3200C2PRO) Corsair TwinX CL2 ( 4 pieces at 512mb ram) Plextor PX-755SA/

  • My lenovo sl510 mic mute and light button not working

    The mic mute button lights up if the sound is muted. However, for the mic, there's no light, whether the mic is muted or not. Is there anybody else who sees the issue? Any solutions?

  • Tracing connect users ipaddreses

    Dear all, I am using oracle 10g,i want to find out all the clients ipaddresses connected(current session) to my database. I tried utl_inaddr.get_host_address(client_machine_name) but it returns some error....... It means,i want to find out ipaddresse

  • Wireless printer for mac OSX 10.7.4 any recommendations

    what is a good wireless printer for mac POC 10.7.4,having problems with hp 3050A

  • Elements 3 + RAW 3.6 - unable to view NEF

    Im unable to view my REW (NEF) file from my Nikon D50 + D100 after installing a copy of elements 3 and downloading & installing the RAW 3.6 plug-in as per the instructions. Can anyone help me?