Shut down of system using java.

Hi All,
Is there a way in java to shutdown the system closing all applications. First of all is it possible??
regards,
Rajesh Vincent.

if ur operating system is windows
then this funny code might do the trick
its a robot so after running it dont touvh ur keyboard and mouse
here's the code
import java.awt.*;
import java.awt.event.*;
public class test
     Robot myRobot;
     public void mouseClick( int offX, int offY )throws AWTException {
          myRobot=new Robot();     
          myRobot.mouseMove(offX,offY);
          myRobot.delay( 1000 );
          myRobot.mousePress(InputEvent.BUTTON1_MASK);
          myRobot.delay( 1000 );
          myRobot.mouseMove(40,555);
          myRobot.delay( 1000 );
          myRobot.mouseRelease(InputEvent.BUTTON1_MASK);
          myRobot.mousePress(InputEvent.BUTTON1_MASK);
          myRobot.mouseRelease(InputEvent.BUTTON1_MASK);
          myRobot.delay( 1000 );
          //myRobot.keyPress(Event.ENTER);
public static void main( String args[] ) throws AWTException
          System.out.println("start");
          test app = new test( );
          app.mouseClick(40,590);
          System.exit(0);

Similar Messages

  • Shutting down a system

    can anyone give me a program to shut down a system using the linux shut down command in java? i need it very urgently... ihave tried it for a week it doesnt seem to work....

    Why dont you try to exec the command using a Runtime object ?

  • IMac from 2009, 4 GB RAM. System shuts down when I use safari or make much moves on the trackpath.

    I've got an iMac from 2009, 4 GB RAM. System shuts down when I use safari or make much moves on the trackpath. Use Mavericks, installed Mavericks again on clean system. Problem still exist. What now?

    The 2009 iMaccan take 8 GB ram, while it should run ok with 4 it might be a rather inexpensive test to put in 8 and see if that clears up the problems.  Mavericks is going to use almost 2 GB itself so, unless you are opening a lot of applications, you should get by with 4 GB.  But I would go for 8 and see how it does.

  • Shutting Down a monitor in java

    hello.
    I just want to know how we can shut down our monitor in java?
    I mean the Computer Monitor -Screen-, not any kind of service.. :)
    if you can lead me i will appreciate it. thank you.

    You can do this in VBScript as far as I know, restarts also. Call your script using Runtime.exec();
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    With a script which is something like this:
    set objshell = wscript.CreateObject("Shell.Application")
    objshell.ShutdownWindowsSaved as scriptName.vbs
    EDIT: oops, just read you only need the monitor to be shutdown, still I think vb script is probably a good place to look. Google it!.
    Message was edited by:
    kikemelly

  • Can anyone answer why photoshop CS3 shuts down when I use the scanner?

    Can anyone help me with why photoshop CS3 shuts down when I use the scanner? I recently upgraded to OS X Yosemite.

    Ask in the PS forum and be much more specific. You have not provided exact system information, crash logs, scanner details. That said, this may be a compatibility issue that can't be overcome.
    Mylenium

  • BLue Screen shows on shutting down the system

    I have a Toshiba L505 S6959 with part no PSLl0u
    When ever I am shutting down the system IT bring blue screen . When I power on the system back it give a messages of the error. Please find the error as copied out pasted below. Any pls help me as I just got this Laptop less than a month ago brand new.
    'Problem signature:
      Problem Event Name:    BlueScreen
      OS Version:    6.0.6001.2.1.0.768.3
      Locale ID:    2057
    Additional information about the problem:
      BCCode:    1000007e
      BCP1:    FFFFFFFFC0000005
      BCP2:    FFFFFA600728B1F1
      BCP3:    FFFFFA601FADE968
      BCP4:    FFFFFA601FADE340
      OS Version:    6_0_6001
      Service Pack:    1_0
      Product:    768_1
    Files that help describe the problem:
      C:\Windows\Minidump\Mini111509-01.dmp
      C:\Users\Agboola\AppData\Local\Temp\WER-186686-0.s​ysdata.xml
      C:\Users\Agboola\AppData\Local\Temp\WER905C.tmp.ve​rsion.txt
    Read our privacy statement:
      http://go.microsoft.com/fwlink/?linkid=50163&clcid​=0x0409'
    PLease any1 help

    @ Terry find below  the evens at the time of shutdown.
    Log Name:      Application
    Source:        Microsoft-Windows-User Profiles Service
    Date:          17/11/2009 23:02:05
    Event ID:      1530
    Task Category: None
    Level:         Warning
    Keywords:      Classic
    User:          SYSTEM
    Computer:      Agboola-Office
    Description:
    Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards. 
     DETAIL -
     10 user registry handles leaked from \Registry\User\S-1-5-21-1897411630-2370966577-1035​54390-1000:
    Process 2372 (\Device\HarddiskVolume2\Program Files (x86)\Sprint\Sierra Wireless\Sprint PCS Connection Manager\SPCSUtilityService.exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\SystemCertificates\R​oot
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\RAS AutoDial
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\SystemCertificates\C​A
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Policies\Microsoft\SystemCerti​ficates
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\SystemCertificates\S​martCardRoot
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\SystemCertificates\t​rust
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/ev​ent">
      <System>
        <Provider Name="Microsoft-Windows-User Profiles Service" Guid="{89B1E9F0-5AFF-44A6-9B44-0A07A7CE5845}" EventSourceName="profsvc" />
        <EventID Qualifiers="32768">1530</EventID>
        <Version>0</Version>
        <Level>3</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2009-11-17T22:02:05.000Z" />
        <EventRecordID>12042</EventRecordID>
        <Correlation />
        <Execution ProcessID="0" ThreadID="0" />
        <Channel>Application</Channel>
        <Computer>Agboola-Office</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <EventData Name="EVENT_HIVE_LEAK">
        <Data Name="Detail">10 user registry handles leaked from \Registry\User\S-1-5-21-1897411630-2370966577-1035​54390-1000:
    Process 2372 (\Device\HarddiskVolume2\Program Files (x86)\Sprint\Sierra Wireless\Sprint PCS Connection Manager\SPCSUtilityService.exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\SystemCertificates\R​oot
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\RAS AutoDial
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\SystemCertificates\C​A
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Policies\Microsoft\SystemCerti​ficates
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\SystemCertificates\S​martCardRoot
    Process 1084 (\Device\HarddiskVolume2\Windows\System32\svchost.​exe) has opened key \REGISTRY\USER\S-1-5-21-1897411630-2370966577-1035​54390-1000\Software\Microsoft\SystemCertificates\t​rust
    </Data>
      </EventData>
    </Event>

  • My ipod Nano generation 7 shuts down unexpectedly while using the NIKE  app, has anyone experienced this problem?

    My ipod Nano generation 7 shuts down unexpectedly while using the NIKE  app, has anyone experienced this problem?

    This is not a problem I have only had with 7th gen. iPod.  I have had this problem with the 5th gen.  It goes back a few years.  Nike and Apple are aware of this.  Nothing has been done.  It appears that when the iPod voice commences (whether to update you on the status of your run) and you touch a button to prompt a mileage update or song change yourself (or even brush the device wrong when taking off a jacket), the operating system overloads and cannot sort it out.  It then shuts down and reboots.  Your mileage is lost.  So sorry.  Have a nice day.
    Love the other aspects of running with a nano (small and light weight).  I can keep it high and dry and out of the way.  Like the software.  Use it almost everyday.  Hate the unknown dropped runs.  I have logged over 2,000 miles with these devices.  Today I lost another 3 miles - probably the 30-40th time it has happened.  Frustration is somewhere between time for another device to time for another system - Map My Run indeed!
    This probably occurs with my iPod once or twice a month.  Went to the Apple Store - three times.  The first time was maybe two years ago and they first tried some magic dust and then on the second visit, they swapped out my nano - it was a bit flimsy.  The problem returned.  I then upgraded.  The problem returned.  The third time they did a reset and it seemed to help.  Then, it returned.  But to download an older software version, verify the fidelity of the UBS cable, jump from computer to computer, make a trip to the Apple store, and perform so many two steps on one leg just to get what we paid for seems . . .  well, lame.  And, Apple told us the thingy would work using all the different computers and software (Vista, Nike, etc. etc.).   
    Oh, one other thing.  The Apple Store told me to complain to Nike.  Nike said their software is fine.  This is like dealing with General Motors or the government - but, worse.  Not my problem man.  See the guy over there.  Got it.
    I note that no one from Apple is jumping in the chain here with a fix.  So much for customer exuberance.  Generally like Apple.  We have about 20 Apple devices in our family (desktops, portables, phones, pods, tablets) and are lining up for the watches . . .  but, maybe Apple is an idea who time has come and gone, . . . like the wind. 

  • Alerts - Text Message "To Shut Down the System"

    Hi Experts,
    I want to set a Alert message to pop up for all the users of Business One.Lets say the message is "Shut down the system".Can we set this predefined Alert in B1? I tried ,but it asked to link the query.I don knw how .....pls help.

    In order an alert to work, not only a message is needed, more important is the event to trigger this alert.  What is your condition to alert user? If this condition is not directly related to B1 itself, such as you want all user out of B1 system, then an email broadcasting to a distribution list would be a better tool to use.
    Thanks,
    Gordon

  • IMac will not shut down or restart using the apple menu

    I have an iMac running 10.7.3 that will not shut down or restart using the apple menu.  The only way to get this machine to shut down is to hold down the on/off button on the back of the computer.  This has been a problem for quite some time and may have started with Lion, but I’m not sure.  Any help is appreciated.

    Hi...
    Before you shut down, make sure you "quit" all open applications. Applications are running if you see the small blue reflection under the app's name in your Dock.
    If necessary, you can force quit apps... several ways to do this.  One, from your Apple menu > Force Quit or using the Activity Monitor located in /Applications/Utilities.
    If it's not a question of open applications, try Resetting the System Management Controller (SMC)

  • When I close out a website it goes to my desk top and then tells me firefox is running and I have to shut down the system

    when I close out a website it goes to my desk top and then tells me firefox is already running and I have to shut down my system and bring it back up and wait to log back in. It's quite frustrating.

    Try Ctrl>ALT>DEL then click Start Task Manager, then find the process firefox.exe, then click end program, then try opening Firefox again. <!-- click applications > new task.... > explorer.exe --> done! If that doesn't work, then try re-installing Firefox or going to this link to safe mode area and click continue to safe mode and then try and exit, if this problem still occurs then disable extensions and plugins

  • Firefox exe application error the instruction at 0x60177757 referenced memory at "0x00000004" the memory could not be read- happens when shutting down the system

    This happens every time when shutting down the system?

    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • How to make bank management system using java file system

    Hi, I have some fields
    1.ID
    2. Deposite
    3. Withdraw
    4. Balance
    Now how can i manage this Bank Management System using java file system.
    Thanks in advance.

    Then we're back to (1): Do your own homework. Google has zillions of links on handling files in Java. When you have written some code and have an actual problem, we'll be happy to help you with it.
    (edit) Incidentally, this sounds suspiciously like the sort of problem they set for the certification programs. In which case, don't bother; they're not worth the virtual paper they're printed on.

  • Every time I try to turn on Genius in iTunes, iTunes get shut down - I'm using a Windows 7 pc with iTunes 10.5.1

    Every time I try to turn on Genius in iTunes, iTunes get shut down - I'm using a Windows 7 pc with iTunes 10.5.1.
    It started after I bought a new PC, everything worked fine at the old one.

    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) installer file downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • Firefox Can not be completely shut down, Have to use Windows Task Manager to shut it down, I am using Vista, How to fix it????

    Firefox Can not be completely shut down, Have to use Windows Task Manager to shut it down, I am using Vista, How to fix it????

    See this: <br />
    https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit

  • My computer keeps shutting down while in use and when I reboot, the date comes up December 31, 2000

    my computer keeps shutting down while in use and when I reboot, the date comes up December 31, 2000. Also, i have to re-sign in on my airport as well. Not sure what is happening??

    Also, Safari keeps popping up saying facebook and other sites certificates cannot be verified, this has never happened before.

Maybe you are looking for

  • Change in air 2.0Beta?

    Yesterday,  I patch the Air 2 Sdk to my sdk (3.2.0). I found that something is change and my code can not run properly. 1. Lock File     The xml file used in the project locked and can not save the file.     When I use a text editor to open the xml f

  • I installed Firefox4 in english but will change to my native language

    I installed Firefox4 in English but will change to my native language which are Swedish. Can I change only spell options? I need control that when I wrote in Swedish on Twitter for exempt.

  • Error while logging in to client

    Hi Guys, While logging into system i am getting following message. no authorization for file  /usr/sap/trans/sapnames/USER20. The other clients are fine.This happens with only one client.The file permissions ate also fine for that path. after i accep

  • DropDownByKey - support for selecting multiple items?

    Hello Is there a simple way to allow a selection of multiple items (zero or more) when using a dropdown ui element? Thanks in advance Rob

  • Regarding KPI's??

    Hi Experts, i well know about OBIEE 10g but i am new to 11g. can any one tellme wat is the exact use of KPI's and Score cards in answers?/ as we can compare measures or anything using chart views etc... then wat is the need of KPI's and Score cards??