Want my client to shutdown the PC using processbuilder!

Hey All
I'm working on a Java server and client. Right now i can send my Client strings using sockets and stream readers and writers. Once the Client recieves this string I place it in a processbuilder function and have it execute the "command" it haas been given, a simple example would be the server sending the client the string "calc" and the client executing "calc" to open the calculator.
My problem is when i send the client a String such as "shutdown -r" to shutdown and restart the client, my client throws an IOException.
Does anyone have any ideas how I can implement a hardware shutdown, do I need to grant the client special permissions to implment critical commands?
Thanks in advance
rev

http://www.google.com/search?q=shutdown+windows+from+java

Similar Messages

  • How to shutdown the PC using Lab View

    Hi,
    We are doing UPS project. In this project we have to shutdown the PC if there is a battery low condition. I want to know whether is their any library function in Lab View to shutdown the PC. And also we want make this labview to run in background whenever PC turns ON, is their any way to make Lab View VI to run in background process. We are also planning to send UPS Status through SMS message to specified mobile number using modem, is their any way to do this using Lab View. Please help me in this regards.
    Regards
    Shivakumar Singh

    Sorry
    Attached now
    "Qod natura non dat, Salmantica non praestat"
    Attachments:
    Shutdown_labview.zip ‏67 KB

  • How do I configure snow leopard server to allow local client to access the server using its public domain name

    I have SLS 10.6 running on my local network with DNS configured.
    I can access the server from a client on the lan using server.local or server.domain  where domain name is my publically registered domain,
    From the internet I can access my server using the registered domain name i.e. www.domain.com. 
    Is it possible to set my server up so that www.domain.com  also reaches the server when used by a client locally?   At present I get a page not found error.

    The configuration you're aiming for is called split-horizon or split-brain DNS, and it's quite possible.  It can get slightly hairy when you have different stuff using the same host name for different purposes, for instance, and you'll need to track all external DNS entries in your internal DNS server when you're running "split". 
    Here is how to set up DNS services.   Split-horizon is one of the options listed there.
    My preference is to use a different domain or subdomain within the network, and to avoid using split-horizon where I can reasonably manage it.  One domain name is configured for and reachable outside and is effectively public, and the other domain (or a subdomain) is inside and private and only reachable directly or via VPN, for instance.

  • I want to know wich is the app used for word art in apple's keynotes or some of the bests

    i've tried ART TEXT 2 but i don't think it is one of the bests.
    alternatives? used in apple keynotes? thanks

    I found a Photoshop tutorial.
    http://graphicsmake.com/photoshop-tutorials/photoshop-tutorial-how-to-achieve-ap ple-text-effect/

  • Is it possible to shutdown the computer using java?

    If any of you knows, please tell me thanks!

    Anione who can answer me with an example will get 10 Duke Dollars. plssss.... tell me...

  • What are the proper settings to encode for the iPad using compressor?

    I'd like to use 1080p the specs say it is capable of.
    I can get it working using hand brake but I don't see why I can't do it with compressor.

    The official specs for the iPad 2 do not include the 1080p video format so your not going to find a 1080p preset in Apple's Compressor that is marked for use with any iOS device. Apple states the following in the iPad 2 specs:
    "Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format"
    However, the iPad 2 CAN mirror or scale up to a 1080p TV output and that's all they mean when they say:
    "Video mirroring and video out support: Up to 1080p with Apple Digital AV Adapter or Apple VGA Adapter (cables sold separately)"
    In any case, all of the A4/A5-based iOS devices can (unofficially) decode 1080p video but for quality results you do need the iPad 2 (the iPhone 4, 4th generation iPod touch, and the original iPad can decode some 1080p sources but you may see dropped frames or stuttering on those "lesser" devices).
    As for creating 1080p content you can use whatever tools you want (just select 1920x1080 as the dimensions, use an H.264 codec, and restrict the bitrate to something between 4 to 10Mbps -- you may need to experiment with the latter to find the best results). However, you MIGHT need a third-party app to actually transfer and play that content on your iPad since iTunes MAY not allow you to directly sync that file to your iPad (because it exceeds the "official" spec).

  • CSA : what are the port used

    Hi,
    I'm trying a lab about CSA.
    In the LAN, there is policy with the firewall.
    So I want to know what are the port used bye the CSA MC and agent. (From MC to Agent and from Agent to MC.
    Is there any link to more document ?
    Best regards

    It's in the readme file on the downloads page.
    3. Port Usage Information
    This section explains which ports are used for communication by the product.
    Web Browser to CSA MC communication uses port 443 (https).
    Cisco Security Agent to Management Center communication occurs over port 5401
    Port 443 is used by default if port 5401 is not available.
    Port 80 is also required for agent kit caching.
    Analysis Jobs to CSA MC communication occurs over port 5401.
    Tom

  • I have a business and I use iCal for all my appointments, how can I print receipts from my MacBook to a receipt printer? I want my clients to have a receipt of the services that they have paid for, can anyone HELP ME PLEASE?

    I have a business and I use iCal for all my appointments, how can I print receipts from my MacBook to a receipt printer?
    I want my clients to have a receipt of the services that they have paid for, can anyone HELP ME PLEASE?

    Well...I went to the modem (Westell, WireSpeed), found the NAT settings, once again, I'm WAY over my head, I am assuming this is a TCP connection (as opposed to a UDP) and per Lorex my mobile devices will use port 1025.  So I gave it a "global port range" of 1-10 and I indicated that the "base host port" was 80, 1025, & 9000 (ports 1,2,3).  When I selected the 'enable' it asked for a "host devise" my choices are my IPhone, IMac and the IP address for the dvr, so I choose the dvr.  I still cannot connect and canyouseeme still can NOT find these open ports.  This is taking up my whole day! I don't know how people figure this stuff out.

  • I have installed oracle 10g in my winxp machine. i am using enterprise manager. i am not able to shutdown the system as it asks for os username and password. i have provided my os username and password but eerror persiste. somebody pls help me to get rid

    I have installed oracle 10g in my winxp machine. i am using enterprise manager. i am not able to shutdown the system as it asks for os username and password. i have provided my os username and password but eerror persiste. somebody pls help me to get rid of this.

    Here I am using Java Type IV for database
    connection.
    So,there was no necessity of creating DNS.How your app communicates with db shouldn't matter for the end user. Still, you may want to use a functional network name also for the thin client driver connection string.
    So,is there any other way to solve this problem.What is the problem really? Do you not use dns for network naming? Maybe you have to manage the hosts file on every client then.

  • HT5022 I'm trying to add a "new client" to my wireless network using Airport Utility, but I can't find that option in the new version.  I've downloaded all available updates of the OS and the utility..  Help!

    I'm trying to add my HP wireless printer as a "new client" to my wireless network using Airport Utility, but I can't find that option in the new version.  I've downloaded all available updates of the OS and the utility..  Help!

    Why would you need to ADD a new Client. Unless the APE sytem is completely different then any other Wireless router the printer should get an IP address from the router. That is IF the printer is setup to get an IP from the LAN DHCP server.
    Now you may want to make that IP it does get a Staticly assign IP address so it never changes, which will screw up printing if it does change. But i don't know if you can do that with APE routers.

  • Is is possible to shutdown the Java Cluster using an OS command?

    We have a Netweaver 7.0 dual stack system.  How can we shutdown the java cluster only using a Unix OS command?  I tried "stopsap j2ee" but that shutdown the j2ee and abap services.  I only want to shutdown the j2ee services (dispatcher,server & sdm).  I know you can shutdown the java cluster using SMICM and jcmon, but these are interactive interfaces.  I am trying to create an Unix script just to shutdown the java components.
    Is this possible?
    Thank you!

    Hi Magnus...
    The command STOPSAP with the switch J2EE stop SAP NetWeaver
    as per SAP start/stop
    http://help.sap.com/saphelp_nw70/helpdata/en/71/1c9a4267f9c66ae10000000a155106/content.htm
    but may be try this
    STOPSAP.EXE name=<SID> nr=<SYSNR> SAPDIAHOST=<host>
    one thing remembered ABAP Schema has formula SAP<SID> ( Database Schema), but in Java Schema SAP<SID>DB ( there is additional u201CDBu201D).
    ABAP instance called DVEBMG<system number>, JAVA/SCS Instance called SCS<java system number>, commonly, for example my server uses DVEBMG00 and SCS01
    thnx....

  • I can only shutdown arch linux using the terminal.

    Recently I started using SLIM to log into Arch Linux. I was having trouble with the gnome-keyring window popping up everytime I logged in while using GDM. I downloaded SLIM and changed some settings so that gnome-keyring wouldn't pop up everytime.
    Here are the changes I made:
    ~/.xinitrc using this article https://bugs.archlinux.org/task/18930
    exec ck-launch-session gnome-session
    eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh)
    And /etc/pam.d/slim
    #%PAM-1.0
    auth requisite pam_nologin.so
    auth required pam_env.so
    auth required pam_unix.so
    account required pam_unix.so
    password required pam_unix.so
    session required pam_limits.so
    session required pam_unix.so
    session optional pam_loginuid.so
    session optional pam_ck_connector.so
    auth optional pam_gnome_keyring.so*
    session optional pam_gnome_keyring.so auto_start*
    *= the changes I made to the file.
    I was hoping to just stop gnome-keyring from popping up everytime I log into Arch Linux (ideally I wanted to auto log in) and now I can't shutdown unless I use the $ sudo shutdown -h now command in the terminal. When I click on the "Power Off" button in Gnome 3 it basically logs me out to the SLIM log in screen. I was able to shutdown the computer before by shutting the laptop screen/lid but that doesn't do anything now for some reason. Is there a way for me to auto log into arch without the gnome-keyring popping up everytime?
    Additionally, with the gnome keyring dialog I wasn't able to click the "Automatically log in....." radio button because it was grayed out for some reason.
    Last edited by rg_arc (2011-09-06 19:45:05)

    $ ck-list-sessions
    Session2:
    unix-user = '1000'
    realname = 'Ricky ******'
    seat = 'Seat1'
    session-type = ''
    active = TRUE
    x11-display = ':0.0'
    x11-display-device = '/dev/tty7'
    display-device = ''
    remote-host-name = ''
    is-local = TRUE
    on-since = '2011-09-06T10:32:31.899610Z'
    login-session-id = '1'
    Session1:
    unix-user = '1000'
    realname = 'Ricky *******'
    seat = 'Seat2'
    session-type = ''
    active = FALSE
    x11-display = ':0.0'
    x11-display-device = ''
    display-device = ''
    remote-host-name = ''
    is-local = TRUE
    on-since = '2011-09-06T10:32:31.706583Z'
    login-session-id = '1'
    $
    I believe everything is working smoothly after I rebooted... I think this is solved... but its good measure to double check.
    thanks for the input guys
    Last edited by rg_arc (2011-09-06 15:37:05)

  • When i add an invoice number on 'overview' sheet want it to automatically add the same data to client's individual transaction sheet?

    Hi,
    Im fairly new to numbers and have had limited experience to spredsheet based programs, so bare with me and i already appreciate your time to help!
    Apologise on the question description but, im attempting fairly indepth equations for my business and once all set up and learnt it will help a great deal!
    So, I have an overview sheet including all sent invoices to all clients. I am having to link each cell one at a time between the overview sheet and the clients individual sheet so the data is viewable on both sheets. I want numbers to transfer the data from my overview sheet to the corresponding clients individual sheet based on the invoice number i input. eg. invoice numbers system is 101 for my first invoice 102 is my second invoice . I then add a client number eg. 101 is client 1. 102 is client 2 so my invoice numbering system would be 101 - 101 or 101 - 102 (invoice number first then client number). when i add a clients number i want numbers to add that line of data (sales amount and dates) to the clients sheet.
    Is that possible?
    Thanks so much for taking the time to look and hope it's not to confusing!
    Ian

    Hi Ian,
    As I read your description:
    You have a Main table ("Overview") on which you record ALL invoices.
    You want, for each client, a table on which only the data for invoices issued to that client will appear.
    Each client will be identified by a client number, and that client number will form part of the invoice number.
    Certainly possible, but I'd suggest a few changes to whaty you're starting with.
    Place the client number and the invoice serial number into separate columns (or split off the customer number into a separate column, You want to transfer/copy every record for a specific customer into that customer's individual sheet. Here's a short example:
    I have entered the invoice numbers as you described them in column B of Main.
    Column E extractsthe three digit client number using this formula:
    E2, and Filled Down: =IF(LEN(B)>6,RIGHT(B,3),"")
    Column F creates a client index by copying the cient number from column C, then counting the number of occurrences of that number are found from the top of column C to the current row, and appends that number to the end of the customer number.
    F2, and filled down: =C2&COUNTIF($C$1:C2,C2)
    These two columns should be added to the right of the existing table, and may be hidden.
    On the individual table, Haydn 101, there is one formula, filled to all cells.
    The basic formula is:
    =OFFSET(Main :: $A$1,MATCH($A$1&ROW()-1,Main :: $F,0)-1,COLUMN()-1)
    which returns the results for as many ,ines as there are transactions to transfer, and produces error messages after that.
    To avoid the error messages, and produce 'empty' cells, add the following error trap, using the IFERROR function (bold added to show addition):
    =IFERROR(OFFSET(Main :: $A$1,MATCH($A$1&ROW()-1,Main :: $F,0)-1,COLUMN()-1),"")
    Fill the formula down column A, then Fill right for as many columns as are needed.
    The individual tables, Ives 102 and Scarlatti 103 are duplicates of Haydn 101. Only the Client Number, in cell A1(and the name of the table) are changed.
    Regards,
    Barry

  • Want to shutdown solaris 10 using java application

    Greetings all!
    I have been unsuccessful at creating my application to shut down a Solaris 10 server with a java application. I am hoping someone might be able to point me in a good direction here.
    I want to log on as a regular user and run a java application that monitors remote information (UPS battery voltage) and will gracefully shutdown the server if there is a problem. If I run my application as root all is well, except that I am running as root :)
    I can write code to access the shell:
    Process proc = Runtime.getRuntime().exec("ls");
    BufferedReader Input = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    while ((s = Input.readLine()) != null) {out.println(s);}
    But I can't do a "su"?
    I've tried multiple examples out there of code that allows shell communication, and good examples of using Runtime.getRuntime()
    I think the conclusion is that you can't issue a su command via java application.
    I've also tried to telnet from a console to localhost and log in as root - no joy there either.
    Would someone have information that might point me in the right direction to solve this problem? Even better, if there is a sample snippet to go along with any help.
    Thank You very much!
    Ray

    Wow,
    Thank you for the very detailed response! I read the referenced web page last night, I'll read it again today too. RBAC sounds like a pretty complicated administrative tool. Coming from the Win32 domain, most of this security stuff is sadly uncharted territory for me (except for my mac).
    Let me see if I understand your method:
    Create a role, javarole, this role needs Primary Administrator priviliges (in order to invoke "shutdown -y -i5 -g0") only available to root
    Create a powerdown profile, essentially a script:
    this line creates the file:
    # echo "powerdown:::profile to powerdown server:help=powerdown.html" >> /etc/security/prof_attr
    I think this is the actual added script: (instead of the shutdown command just use init 5)
    # chmod 755 /usr/sbin/powerdown
    # cat > /usr/sbin/powerdown <<EOF
    #!/bin/sh
    /usr/sbin/init 5
    EOF
    This line is a bit confusing to me, is it also part of the script?
    # echo "powerdown:suser:cmd:::/usr/sbin/powerdown:uid=0" >> /etc/security/exec_attr
    I see the uid=0 (root)
    It seems obvious to me that I log in a root to create this script, which is the reason it has permission to shutdown...right?
    Also, I tried the su command using runTime.exec("su poweroff"); // a user I created to try poweroff scripts
    It seems that su is generally not available, I will create the role and try to telnet to it.
    What about creating a generic user script that includes the javarole name and password, and then run the script "/usr/sbin/powerdown"
    Yes, it leaves a role password exposed, however it is a very limited role, that is not accessible by a user login, but the turn off script is available to every user?
    Regards,
    Ray

  • Why I need the same pof conf on client+srver if Coherence is used as cache?

    Hi,
    I have first defined my own pof-config.xml only on my client.
    And Coherence wrote me a very ackward msg: "StreamCorruptedException unknown user type 6" !!!????
    I have made another try, while defining my own pof-config.xml on my servers too !
    Then, Coherence has worked smoothly, as expected.
    QUESTION: as I use Coherence as a cache, using no index, no EP... I expect Coherence is not going to dig into my byte[] for the 'server' nodes.
    Then, I expect only the clients have to serialize/deserialize, I expect they send the byte[], and the servers store only them, that is, without needing any pof config.
    If it works as I have written, why Coherence is not working ("StreamCorruptedException unknown user type 6"), if I define my own pof-config.xml only on my client ?
    Thanks.
    Regards,
    Dominique

    Hi Dominique,
    user4947403 wrote:
    Hi Robert,
    robvarga wrote:
    Hi Dominique,
    Coherence does not know what you will do with the data. It has to assume that you may want to send an entry-processor or entry aggregator or query the items with a filter, or you may simply want to get the item from the cache WITHIN the cluster not only via Extend. imho, I feel it as counter-intuitive.
    I have expected something like: as far as no EP is run, no pof config is searched+if no pof config exists in order to deserialize when needed, raise an exception.
    1. There is no such thing as no config. If you don't specify an explicit configuration, default configuration is used, which (depending on whether POF is globally enabled or not) is either a DefaultSerializer, or a ConfigurablePofContext loading stuff from pof-config.xml.
    2. If some data travels across the proxy connection, it has to travel in the serialization format configured for the proxy service. If you put data into a cache, it has to travel on the network in the serialization format configured for the cache service of the cache. Period.
    If this rule was not followed, Coherence would not know what serialization format any piece of data has. Therefore as mentioned below, if the proxy service serialization configuration differs from the cache service serialization configuration, data has to be de- and reserialized on the proxy.
    Again, imagine the case if your logic were followed: Just because you used some service to put data into the cache, Coherence cannot know that you will use the same service to get the data back. If some code inside the cluster tried to deserialize it, it would fail as it has no idea, that it was serialized with the proxy serialization format. It actually doesn't even have an idea that the data came from the proxy, or even that there is a proxy. Also, if you used some other code to put data into the cache which is not coming via the proxy, you would have another piece of data sitting in the cache which was not serialized by the proxy serialization format. If you tried to retrieve that via the TCP*Extend, you could not deserialize it on the client as it is not in the serialization format used by the proxy. Moreover, the client does not even have any chance of even knowing what it was serialized with as the client does not even see the serialization configuration of services inside the cluster.
    Because of this it has to ensure that it can deserialize it with the serializer configured for the cache service within the cluster, so not with the one used for TCP*Extend.Well, in my case, my client is a cluster node+localstorage=false => are the explanations you wrote ok for this case too ?
    It does not matter how your cluster looks like at the moment when you consider consistency checks. Nothing prevents you to start another cluster node, therefore Coherence cannot be lenient in the service configuration consistency checks just before .
    By the way, if you have only a single storage-disabled cluster node (and that means that no cache server node is running) and you tried to put something into a distributed cache then if the serialization error did not happen because you have correct configuration, then you would have received a Storage not configured error instead, as no cache server node is running to actually store your data.
    So if you did not get any errors, then you were either putting the data into a replicated cache where being storage-disabled is not relevant as that is a distributed cache setting, or you had a cache server node running or you only believed that the node was storage disabled.
    Best regards,
    Robert

Maybe you are looking for

  • Can't restart Yosemite in Recovery Mode

    I installed Yosemite on my mid-2012 MacBookPro yesterday, seemingly without difficulty.  But: when I discovered that I didn't have permissions to read or write on anything, i ran Disk Utility.   I tried Verify/Repair Permissions first, which discover

  • Any card reader to transfer Compact Flash Raw photos to Ipod 5G

    Hi I have a Canon 10D digital camera and have a 2Gig Compact Flash Card, I would like to know if there's any compact flash card reader for Ipod video (5th Gen Ipods) so I can use it as a Hard Drive and transfer my RAW photos to the Ipod. Any suggesti

  • VC Installation with IIS 6.0 and MS SQL 2005 on MSServer2003

    Dear all, Is it possible, if we plan to install VC6.0 with IIS6.0 and MS SQL 2005 on MS Server 2003? Now I have installation guide for install VC6.0 but it 's recommend to use MS SQL 2000 [Now MS SQL 2000 is very old and my company plan to use 2005]

  • Window7 64-bit not loading past sunray screen

    i have a hp pavilion p6-2112b that has stopped fully loadind windows. i get the hp hand then a bar that tells me its loading files(that never happened before today) to the starting windows screen. after all that i go to a "sunray" screen that quickly

  • Problem with COH_MANAGED_BOX_UPDATER

    Hi, I'm trying to update a variable selection of properties from a C++ program. I have a java implementation of the class. The simplest case I have is           String::View txn_id_v = String::create(m_transaction_id);           ValueUpdater::Handle