Java dying when user logs off machine

I have developed a class that monitors a MQ queue, I used the active-x bridge to allow distribution to both java and VB developers to use. The application that is to be developed should be running on a machine in the background.
I created a test VB program using the java class and created a "scheduled task" to start on system start up. When I start the machine, the application starts up and runs. Then a user logs into the machine, and application is still running. Then the user logs off the machine, and the program stops.
I have a VB porgram without the java active-x bridge object and that works throughout the login/logout process.
Any thoughts on how I can keep the program running continously, thanks.

Well, I found a solution. If you add the paramater -Xrs to the java command, it will reduce the use OS signals. Thus it will ignore the hook that Windows has.
It turns out this was a bug in version 1.3. For some non-light reading and more info, see http://developer.java.sun.com/developer/bugParade/bugs/4323062.html

Similar Messages

  • Run LabVIEW executable when user logs off

    I have a customer request to do this.
    My customer has a computer in their plant that I wrote a LabVIEW applicaiton to monitor part of their process.  This computer performs other functions in addition to my program.  Their IT department has changed their policy that mandates that anybody using this computer has to log in under their own user name and password.  Prevoulsy it was just a group  user name and password.  What this means for me is everytime a new user needs to use the PC they have to log off and log back on.  This stops my program.
    Is there a way to have a LabVIEW executable keep running when different users log off and log on?
    Thanks
    Dan

    Sounds like you need a service. It may be a complete architecture change, but you could have an executable running as a service and a user interface executable connecting to it (e.g. via TCP/IP). The service itself can't have a UI.
    Without using a service there's no way an application can continue running when a user logs off (afaik).
    A service is started even if no user logs on.
    There's tools like srvany or similar that allow to run an executable as a service.
    Daniel
    Message Edited by dan_u on 08-18-2009 03:13 PM

  • System PATH environment variable issue when user log off and log in or switch from admin to non-admin account

    Hi,
    Problem Description:
    After installing my new product version, when user does log-off and log in again into admin account
    or switch from admin account to non-admin account, PATH environment variable shows incorrect path of my product (previous product version’s path) using command prompt.
    It seems windows refresh issue during session changes (log off and log in / switch from Admin to
    Non-admin account).
    Why PATH environment variable is not refresh immediately after log off and log in again or Switch
    from admin to non-admin mode?. 
    Please see my thread for more details http://social.msdn.microsoft.com/Forums/vstudio/en-US/445ab42c-bdff-405a-8d53-558e1b6c7d34/path-environment-variable-issue-when-user-logoff-and-login-or-switch-from-admin-to-nonadmin?forum=windowsgeneraldevelopmentissues
    Also submitted bug for this in connect.microsoft.com portal.In that it has lots of information
    like problem statement, Reproduction steps and Expected Results.
    Bug ID: 871782
    Could you please any body help me for this?. your support will be appreciated.
    Thanks,
    Marichamy

    Why PATH environment variable is not refresh immediately after log off and log in again or Switch
    from admin to non-admin mode?. 
    I wouldn't have any expectation of what you are doing to work the way you expect.  E.g. why is the %ABC% being replaced at all?  There is some help about this ambiguous scenario in the cmd help...
    /V:ON Enable delayed environment variable expansion using ! as the
    delimiter. For example, /V:ON would allow !var! to expand the
    variable var at execution time. The var syntax expands variables
    at input time, which is quite a different thing when inside of a FOR
    loop.
    /V:OFF Disable delayed environment expansion.
    So, what's the setting for the /V:  switch that your users would be using?  Perhaps you should be using the ! instead of the % for your ABC variable?
    Oh.  There's more below where I found that...
    Delayed environment variable expansion is NOT enabled by default. You
    can enable or disable delayed environment variable expansion for a
    particular invocation of CMD.EXE with the /V:ON or /V:OFF switch. You
    can enable or disable delayed expansion for all invocations of CMD.EXE on a
    machine and/or user logon session by setting either or both of the
    following REG_DWORD values in the registry using REGEDIT.EXE:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
    and/or
    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion
    to either 0x1 or 0x0. The user specific setting takes precedence over
    the machine setting. The command line switches take precedence over the
    registry settings.
    In a batch file the SETLOCAL ENABLEDELAYEDEXPANSION or DISABLEDELAYEDEXPANSION
    arguments takes precedence over the /V:ON or /V:OFF switch. See SETLOCAL /?
    for details.
    If delayed environment variable expansion is enabled, then the exclamation
    character can be used to substitute the value of an environment variable
    at execution time.
     So, I guess the essence of your "bug" will boil down to whether you
    need the feature to get the result you want and the
    truth of that first sentence but it certainly looks like a "can of worms" to me.   ; )
    HTH
    Robert Aldwinckle

  • Unassign roles when user logs off

    Hi all,
          Has anyone tried writing your own code in DSM terminator component? Is it possible? How to do it?
    Actually, am trying to unassign the roles assigned to the user, when the user session terminates. Is there any way I could achieve it? I know the APIs required. But where do I implement them?
    Please help.
    Thanks & regards,
    M.Subathra

    Hi,
    Perhaps this is not the solution you need or want, but I will try to explain how it works.
    You can do a PCD lookup on a role, something like this:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
        IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
    env.put(Context.SECURITY_PRINCIPAL, request.getUser());
    env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_ADMINISTRATION);
    env.put(IPcdContext.PCD_PERSONALIZATION_PRINCIPAL, request.getUser());
    InitialContext iCtx = null;
    try {
        String roleID = "pcd:portal_content/myFolder/myRole";
        iCtx = new InitialContext(env);
        IAdminBase myIView =(IAdminBase )iCtx.lookup(roleID);
    catch(NamingException e) {}
    From the IAdminBase, you can get an IAttributeSet interface, and on this object you can set an attribute (like the invisible property or entry point).
    When you set the property, the property is only set for the current user. Why? Because in the environment variables for the lookup, you added the IPcdContext.PCD_PERSONALIZATION_PRINCIPAL variable and set it to the current user.
    Again, I do not know if this is helpful for your scenario, but you could use it to make it invisible. You may have an issue in undoing this, in that, how will you know what roles are available, since the navigation service would no longer get this role as available for the user.
    Hope this helps.
    Daniel

  • How to set printer margins if using a lot of printers in virtual desktops which are deleted each time users logs off

    Hello,
    i am using Firefox version 31. I have a problem with page setup margins. I need to use left
    30mm; right 10mm; top 20mm; bottom 20mm. I am using VMware floating assignemnt linked clones
    virtual desktops. After users log off - machines are deleted and users next time logs on get's brand
    new VDI's. Users gets printers to VDI using login script from Active Directory.
    Option Explicit
    Dim strPrinterUNC, objNetwork
    strPrinterUNC = "\\some_server\printer_number_1"
    Set objNetwork = CreateObject("WScript.Network")
    objNetwork.AddWindowsPrinterConnection strPrinterUNC
    WScript.Sleep (20000)
    objNetwork.SetDefaultPrinter strPrinterUNC
    Set objNetwork = Nothing
    Each user have different logon script, because they use different printers (different printer names e.g. \\some_server\printer_number_2 ; \\some_server\printer_number_3 and etc. Page setup margins in Internet Explorer are ok. But how to make Firefox page setup margins as i need? For other options i have
    used CCK2 Wizard 2.0.4 tool. It worked fine. Maybe i can put some information in C:\Program
    Files\Mozilla Firefox\defaults\pref\autoconfig.js I have some usefull data in it allready. I
    have found info that: "Setting print margins is done in the printer settings". I have a lot of
    printers, so i can not set printer margins individualy for each of them. Now mozilla shows top,
    bottom, right, left each 12.7 mm. What should i do if i have a lot of printers in enterprise
    environment?

    Firefox has a profile folder that has preferences to save this. But the config that would need to be changed is:
    print. save_print_settings = True - (default): Save the print settings after each print job
    Locking that preference: [http://kb.mozillazine.org/Locking_preferences]
    Or done manually:
    #In order to check the margins, we need to go to ''File'' > ''Page Setup''.
    #Once this is done, switch to the ''Margins & Header/Footer'' tab.
    #Check what's set there under ''Margins''.
    The following are the default values for ''Margins'':
    Check these values accordingly and change them if necessary.

  • How to run GINA when windows log off ?

    I test pGina program which was create from GINA. I want create program for logon windows with C#. I wonder when user log off windows why pGina can run application for login windows. I think application can run when start windows only . How pGina can run
    program when user click log off button ?

    Hi mmc01,
    I'm afraid you posted your question on the wrong forum. This forum is dedicated to Project Server concerns, the Microsoft enterprise scheduling & planning application.
    Please go to an appropriate forum in order to have an helpful hand.
    Cheers.
    Guillaume Rouyre - MBA, MCP, MCTS

  • IPlanet 6.0 SP2 restart on Windows NT when a user logs off the server.

    UPDATE: We have found that the iWS 6.0 only restart with JDK 1.3.1 installed for JSP pages. What is the best JDK to use?
    iPlanet 6.0 SP2 restart on Windows NT when a user logs off the server. If a admin or joe developer logs into the server (C+A+D) and does what ever... When the
    person logs off the NT 4.0 box ... ALL the httpd process restart. We have 80 & 443 & Admin. The processes are running under a user account. Any one have an idea why the process are restarting?"

    Hi,
    You can use following JDK version for Windows NT.
    And please check it out whether WinNT-SP6 as been installed in winNT box.
    Window NT:
    SDK and JRE 1.4 http://java.sun.com/j2se/1.4/
    SDK and JRE 1.3.1_02 http://java.sun.com/j2se/1.3/
    SDK and JRE 1.2.2_011 http://java.sun.com/products/jdk/1.2/
    JDK and JRE 1.1.8_009
    http://java.sun.com/products/jdk/1.1/download-jdk-windows.html
    I hope this helps.
    Regards,
    Dakshin.
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • Run shutdown oc4j instance automatically when user Turn off/Log off

    Hi All,
    Can you help me anyone to run the shutdown oc4j instance automatically when user Turn off/Log off the application or the computer?
    I want to use any Schema level trigger if possible to solve the issue.
    I am using oracle Developer Suite 10g and Database 10g as well.
    Arif

    Ah, sorry I misunderstood your question (probably not enough coffee in the morning); anyway there are folders for scripts which should be executed on startup / shutdown or logon / logoff:
    Startup
    %SYSTEMROOT%\System32\GroupPolicy\Machine\Scripts\StartupShutdown
    %SYSTEMROOT%\System32\GroupPolicy\Machine\Scripts\ShutdownLogon
    %SYSTEMROOT%\System32\GroupPolicy\User\Scripts\LogonLogoff
    %SYSTEMROOT%\System32\GroupPolicy\User\Scripts\LogoffWrite a script to startup / shutdown your OC4J (probably calls to startinst.bat and stopinst.bat) and place them in the apropriate folders.
    cheers

  • Rmiregistry surviving user log off

    Is there any way to get rmiregistry to survive a user log off in Wni32?
    If not is there a way to get source code so that it may be altered to start as a service and survive a user log off?
    I am using 1.3.1_04 and 1.4.0_01 of the SDK and JRE on various machines and none survive the log off of a user in WinNT. I have my services start and they will survive the log off of a user but I will not be able to service any new connections after that because rmiregistry has been killed.
    I know that Sun has no plans to correct this and there are several who could use this feature. What are possible work arounds?

    I don't know if there's a direct solution but you can split this into two problems that are easy to solve:
    1) You can start an RMI registry from any Java program -- check out
    LocateRegistry.createRegistry(1099);
    2) Using the "Java Service Wrapper" at http://sourceforge.net/projects/wrapper/ you can turn the above program into an NT service that is robust with respect to logoffs.
    Check out the user forums on the above site -- especially the post "Application that starts the RMI service..." on http://sourceforge.net/forum/forum.php?forum_id=122338 .
    Perhaps someone has a simpler solution ...

  • Applications still run after user logged off

    Hi,
    I have a w2k8r2 Terminal server and have a problem that have eluded me for some time now.
    When a user is logged off, by either being disconnected or being inactive for a prolonged time, the user initiated programs are still running.
    To be more exact, Some times when a user is logged off I have the following situation:
    In the task manager on the users tab I cannot see the user anymore (nor in the remote desktop services manager), but in the Processes tab I can still see user initiated programs running. Furthermore I am not able to kill any of those programs, getting an
    "Access is denied" error message.
    My problem is that when the Terminal Server enters this "state" it becomes all buggy and itchy, causing loads of problems for the users that are already logged in (and for the new ones trying to log in). The only solution I have found is rebooting
    the server.
    Any solution, or further troubleshooting steps, are more than welcome. For me the next step is reinstalling which I really don't want

    1. Check any task schedular is running for application or not,
    Refer :
    http://answers.microsoft.com/en-us/windows/forum/windows_7-security/if-i-log-off-at-night-leave-computer-on-will/559eec53-1d2a-46f8-ac12-f0d4a32ab57a?msgId=b51d42b3-e727-40c0-b94e-8a01b31bf526
    2. Also update Antivirus and scan completely.
    3. Is it specific application or all the application, Which user opened in his session?
    4. If specific application is running (In this scenario Outlook is running even user logs off), Try the below Citrix forum thread.
    Refer :
    http://discussions.citrix.com/topic/301644-user-logs-off-process-outlookexe-stays-active-error-the-citrix-server-has-reached-its-concurrent-application-limit/
    5. Check and update  TCP/IP driver
    Refer : http://support.microsoft.com/kb/2465772/en-us
    6. Also cross verify Dharmesh suggestions also.
    Regards,
    Manjunath Sullad

  • RMI listener stops whenever the user logs off Windows

    Hi guys...
    I have a problem whereby the RMI listener stops whenever the user logs off Windows.
    I've gone through the net and the only solution was to add "-Xrs" to the end of the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IBM Tivoli Identity Manager Adapter" service for the ImagePath statement.
    Unfortunately for me, that did not work.
    Anybody knows how I can go around fixing this.
    Much appreciated.

    What's the RMI listener?
    Do you mean the RMI Registry?
    In which case the solution is to add that same flag when you run the registry.

  • Unable to capture trace, when user logs in throuigh Web Interface

    The Trace shows 'No Records Found', when user logs in through Web Interface of CRM. But there is Trace found, when the same user logs in through logon pad and carries out normal actvities.
    sufficient auth. is provided.
    Is there any setting in ST01, through which i can get trace , when user logs in through Web Interface
    Regards

    ST10 traces 1 instance only.
    Your CRM web interface could use another instance than your backend. Go to transaction SM21, choose the appropriate server and run ST10 again.
    Succes!
    Kind regards,
    Lodewijk Borsboom

  • To Find the user log off date

    Hello Gurus
          I need to find the user log off and log on details.Suppose if the user logs of today and Logs on tommmorow...Then I need to get both those log off and log on details.The log details can be found from USR02 table..Plz help me in finding out the log off date of the user..IThanks
    Ganesh
    Edited by: Ganesh Kumar on Mar 9, 2009 6:57 PM

    Explore SM19 and SM20 tcodes for your requirement.

  • I programmed Firefox to delete cookies when I log off. Now Yahoo! won't remember me. How did I do it so I can go back and undo it?

    I previously programmed Firefox to delete cookies when I log off. Now Yahoo! won't keep me logged on. Yahoo! tech said to restore cookie memory. I don't remember how I took that action. How can I go back and change that setting to retain cookies?

    Tools > Options > Privacy > History > Custom settings
    Accept cookies until they expire
    (You probably don't need 3rd party cookies for remembering logins)

  • Why do my folders on my desktop when i log off then log back in move position all the time?

    When i log off or turn off my laptop and then log back in my folders or files are in different positions then where i had placed them on my desktop previously

    I mentioned in my earlier post.
    And if that doesn't work try using the Desktop Icon Manager (DIM) which has been around since OS9 days to get those pesky desktop icons to behave.
    You arrange your desktop icons the way you want them.  Tell DIM to "memorize" that arrangement.  Make DIM a login item so that when you log in it will move the icons to the memorized positions at login. 
    You can change the arrangment at any time and tell DIM to memorize a new arrangment.

Maybe you are looking for