AHHHHH!  I just dont get it.....

Hello, All! Is there anyone out there with a sample piece of code that would explain how in the heck to execute a local unix command?!? I realize that i should be using Runtime.exec(String), but its just not working for me...help?!?!?
Thanks!

I just posted this code somewhere else, it might help you. I verifies if the user "roort" is logged in:
import java.io.*;
public class CheckLogin  {
   public CheckLogin() {
      super();
   public static void main(String arg[]) {
      try {
         Runtime rt= Runtime.getRuntime();
         Process p= rt.exec("who -q | grep root");
         try {
            int i= p.waitFor();
            if(i == 0) {
               BufferedReader br= new BufferedReader(new InputStreamReader(p.getInputStream()));
               System.out.println("User: "+ br.readLine());
            } else {
               System.out.println("Process did not ran.");
         } catch (InterruptedException iex) {
            System.err.println("Error: "+ iex.getMessage());
      } catch(IOException ioex) {
         System.err.println("Error: "+ ioex.getMessage());
}

Similar Messages

  • I just dont get it! Do you!?

    Hi and boy do I need a valium!
    I just got hit by lightning a couple of days ago and it fried my 2WIRE 1100 that Ive had for years. Along with my phone and satelite system.
    My Linksys WRT54GL wireless router was connected to it but it was undamaged ( I think!? ).
    So I replaced the 2WIRE with a ZOOM X5.
    The ZOOM works fine as a stand alone DSL modem/router, but when I try to add the Linksys router I lose the internet connection. Ive followed the directions to the letter as far as congiging and even tho' both seem to be working fine and all the correct lights are flashing and the Linksys adviser says the network is intact, I still have no internet connection. Ive made sure my Zone Alarm Firewall has given access to anything with zoom attched to it.
    I figure its in the Linksys settings somewhere ( I havent changed them from when it was connected to the 2WIRE ) but I cant figure out where!?
    On the STATUS/ROUTER page under internet cinfig it gives the PPoE login with a disconnected status and no IP-Sub-gateway etc.
    When I try to connect it says it cant get the IP from server.
    And you bet, Ive been trying to power down and reboot all day as well as google every thing I can find on configuring this thing but I just dont get it!
    I could sure use some help if anyone has even an idea they can share.
    Thanks in advance...

    Most modem/routers as you said are set to 192.168.1.1 so if that is your case set your linksys router to 192.168.1.2 so it is still in the same subnet as the modem/routers DHCP range. To access the router you should only connect a hard wired PC and access it with the defaults.  This LINK will show you how.  If you can not access it then rest the router and try again.  This LINK will show you how to reset a Linksys router.  If you have to reset your router then after the rest you can access it with the default settings.  Then change the router IP to 192.168.1.2 and set it up for what ever settings your ISP requires.
    Richard Aichner (Ikester)

  • HOW I HATE IT WHEN I JUST DONT GET IT,Please HELP

    hi every one its me again with another question eheheh
    any way i am still in my learning stages
    GOD WHEN WILL IT END hehehe
    any way
    i was looking at somecode over net and i came across this
    i dont get this part can someone helpme out please
    thax
    public class AnimatorAppletTimer extends JApplet
                                     implements ActionListener {
        int frameNumber = -1;
        Timer timer;
        boolean frozen = false;
        JLabel label;
        public void init() {
            String str;
            int fps = 0;
            //How many milliseconds between frames? 
            str = getParameter("fps");  <=========
            try {
                if (str != null) {
                    fps = Integer.parseInt(str);<==============
            } catch (Exception e) {}
            int delay = (fps > 0) ? (1000 / fps) : 100;<===============
    places where i have <====== i dont get */
    we have string srt but str is null how dose "getParameter" works on it
    and that last line with "?" never seen that in any java codeing before what is that
    same thing gose for ":"
    thx again                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Without looking at the html that is used to create the applet I would not know what the value should be but the following example might help to clear things up:
    <html>
    <head>
    <title>ImageRPS WebDCM</title>
    </head>
    <body background="http://192.168.1.100/KYRISWEB/PROD/img/backgrnd.gif" bgcolor="white" bgproperties="fixed">
    <object id="myapplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
        width="600" height="100" align="baseline"
        codebase="http://192.168.1.100/WEB/PROD/plugin/j2re-1_4_0-win.exe#Version=1,4,0,0">
        <param name="java_archive" value="Web.jar">
        <param name="cache_option" value="Plugin">
        <param name="fps" value="30">
        No JDK 1.4 support for APPLET!!
    </object>
    </body>
    </html>in this example fps would be 30.

  • I just dont get it....battlefield 2 runs AWFUL on my imac 17"

    I cant understand how everyone is saying how well battlefield 2 is running when on my imac its totaly unplayable. How can that be?
    Im experiencing poor framerate and very very often the games just pausing as i turn around as if it cant process the information...when it does this the sound even pauses, its awful! To be honest even if I put graphics on full just to see what the senery looks like its still really poor.
    Sorry I dont have much infor to give you but i think i installed it all right so I dont know what to say really!..anyone got any ideas as to why maybe it would run sooo badly on my imac when theres countless others reporting how good it is on their imacs?

    I think that maybe the problem is with your windows and game software installation rather than the performance of the Mac. I have a 20" mac and I run Battlefield 2 on it without a problem with graphics features on full. I have now even tweaked the performance of the ATI X1600 from 400/400 mhz to 475/475 mhz for an extra 25% performance boost with no problems. Taking into account that Sim City 4 for the Mac is not universal binary then yes the performance will not be good but if a patch comes out that makes it universal then it should be okay. You are aware of the issues of performance for gaming with regard to the software being PPC or Universal ? This is due to the switch to Intel Chips and the fact that non intel universal coded games have to work in PPC emulation (Rossetta) hence the performance hit. Look for Universal binaries when running games as thats where you will get the best performance. As far as Battlefield 2 then thats a bonus to play that game in the first place as its running on Windows XP and its a Apple Mac after all!!! plus the fact that Bootcamp is BETA The current iMac's I feel represent the best value for money that apple has produced in a long long time.

  • Maybe I just dont get it, but what is the use of sending my Premiere project via EDL to Speedgrade?

    I get an error message open the EDL file in Speedgrade unless ALL effects and transitions are removed.  I don't get how this is helpful... how can I do my color grading but then also have the effects and transitions I want?  I am fairly new using Speedgrade (CS6), and love it, but when I can't color grade and make the edits I want, what good is it to me really?  I am hoping there is an answer to this I am simply overlooking as a new user of the program...

    I appreciate the response.  I just wanted to be sure there wasn't an easy way around my problem that I was simply overlooking.  I love Speedgrade and the power it has - it just seems like for it to be any good to me, I have double or even triple my work time on a video project. 
    For example - I am working on a simple 1 minute video, which includes an interview shot in front of a green screen.  The footage is a little dark, but with SG I able to make it look amazing.  So, if I am understanding correctly, my 2 options are:
    1) edit the parts of the interview I want into my PP project, when I am done, send it to SG, then color grade it.  Only problem with this is that I have many crossfades in the video, and when I use "Send to Speedgrade", any part of the timeline that is a crossfade becomes it's own "clip".  Therefore if I grade clip A one way, and clip B another, the transitional AB section looks totally different. 
    2) Send the clips individually to SG before I ever begin editing them, color grade then export.  Then bring those in PP and edit everything together.  Only problem there is, lets say, the green screen interview I spoke of.  This is a 5 minute interview, and exporting this at a lossless quality takes FOREVER.  I started it this way, and once the est. time hit 12 hours and was still climbing, I cancelled it.
    Maybe the computer I am attempting to do this on just isn't up for the challenge (it's a 2011 macbook pro), but I have always used it for Premiere and AE, without any problems.
    Anyway, again, I really appreciate the advice - I am still trying to wrap my head around what exactly my options are with Speedgrade.  Like I said, I absolutely love it - and I really want to be able to use it.

  • I just dont get it

    why is it that creative wont add on free codecs such as OGG and FLAC.
    i mean they are FREE!!!
    i wanna be able to use my mp3 player for my car and stuff, but i might just sell my zen micro and go with the cowon iaudio.
    creative is losing so much business for not supporting these formats.
    i couldntimagine how popular a 5gig lossless player would be, since the apple ipod mini supports lossless it is kicking creative's ass.
    i should have just bought on ipod or something cause now i got a bunch of lossless music that i cant even take with me.
    i bet that creative doesnt even really check these forums...
    seriously what is the point of having 98db singal to noise ratio when you dont have a lossless codec to take advantage of it's
    i know there are threads about wishlists and crap, but tbh, creative will never look at those.

    First of all, OGG is a lossy compressed format like mp3 or wma. Secondly, Creative is probably sticking to WMA and MP3 because those formats are decoded by dedicated hardware on the player. Decoding something else would have to be done with some kind of software decoder in the firmware or on the hard-dri've (this is how iri'ver does it). I don't think Creative wants to go there, and I don't blame them. It's too much development time for too little interest.

  • I just dont understand how to work photo shop HELP ME

    my mom bought this for me and im reading the directions and trying to figure out how it works i just dont get it at all!!! i dont know why, im good at using computers i just nvr grasped the concept of how to work this
    if you have a helpful hint please comment  thank you

    Adobe TV has a whole selection of free videos that should help you to get started.
    http://tv.adobe.com/show/learn-photoshop-elements-8/
    You can also find lots of videos using Google...
    http://www.google.com/search?hl=en&client=opera&hs=6js&rls=en&q=Photoshop%20Elements%208&u m=1&ie=UTF-8&tbo=u&tbs=vid:1&source=og&sa=N&tab=wv
    or YouTube
    http://www.youtube.com/watch?v=F1ZEEPNaqQ0
    If you just search for Photoshop Elements (without limiting it to Photoshop Elements 8 as I did) you will get even more results...most if not all things should work in version 8. (Version 8 user interface will look different and may have additonal features as each version gets new goodies.)

  • I can't connect to the itunes store. I have the latest version of itunes on my windows 7 computer. I can connect to itunes from my ipad and ipod but no my windows computer. i dont get any error message, the bar at the top just says accessing itunes.

    I can't connect to the itunes store. I have the latest version of itunes on my windows 7 computer. I can connect to itunes from my ipad and ipod but no my windows computer. i dont get any error message, the bar at the top just says accessing itunes

    Close your iTunes,
    Go to command Prompt -
    (Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
    (Win XP SP2 n above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
    In the "Command Prompt" screen, type in
    netsh winsock reset
    Hit "ENTER" key
    Restart your computer.
    If you do get a prompt after restart windows to remap LSP, just click NO.
    Now launch your iTunes and see if it is working now.
    If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
    Apple software on Windows: May see performance issues and blank iTunes Store
    http://support.apple.com/kb/TS4123?viewlocale=en_US

  • HT204291 I have a MBP 13-inch, Mid 2010 and have just upgraded to mountain lion and am trying to connect it to my apple tv however i dont get the air play icon on my mac i have followed all the advise on support anyone able to help??

    I have a MBP 13-inch, Mid 2010 and have just upgraded to mountain lion and am trying to connect it to my apple tv however i dont get the air play icon on my mac i have followed all the advise on support anyone able to help??

    stevie, a third party app called airparrot will give you the pretty much the same as mirroring and forks on Macs too old to mirror.

  • I just bought an Apple TV and i have a bose sounddock with a mini jack in the back and and optical cord with a mini adapter on it (so optical cord going into the Apple TV and the mini adapter on the other end going into my bose dock but i dont get sound??

    I just bought an Apple TV and i have a bose sounddock with a mini jack in the back and and optical cord with a mini adapter on it (so optical cord going into the Apple TV and the mini adapter on the other end going into my bose dock but i dont get sound?

    Not all the sound docks accept both analogue and optical on the auxillary input - I don't think the portable ones does but may be wrong - check the user manual.
    As I said earlier all the mini optical (min Toslink) adapter does it make the optical connector fit a smaller socket, it does not convert digital audio to analogue for an analogue only auxillary input.
    AC

  • I just got an android phone but when my friends try to text me from and iphone I dont get it because I use to have one

    So I use to have an iphone but I switched to an android  but when my friends with iphone try to text me I dont get the messages? What do I do to fix it I dont have my iphone anymore I sold it after my upgrade?

    If you sign onto iTunes on a computer and remove the iPhone from your device list.
    Ask your friends to turn on SMS in settings > messages

  • I have changed the apple ID (email, but on my iphone , the icloud is stil asking me to log in whit the old email.And it is poping-up on every 10 seconds.I never used icloud, and i dont want to use it.I just dont know how to disable the icloud.

    i have changed the apple ID (email) but on my iphone , the icloud is stil asking me to log in whit the old email.And it is poping-up on every 10 seconds.I never used icloud, and i dont want to use it.I just dont know how to disable the icloud.

    If you see that pop up you enabled icloud. Whether you want or do not want now to use it irrelevant until you actually disable activation lock.
    In order to do that you have to change your apple id back to do that just long enough to sign in and back out. System will ask you to verify, don't.
    Just sign in on the prompt you getting and then logout. Once done, change apple id to what you have now and verify. Then decide if you want to
    use icloud (who does not want to be able to track their phone if lost or stolen).

  • MDB messages dont get processed from Queues when involving a remote Topic in transaction

    Using WLS 6.1 SP4 on winXP Pro boxes, I have come across a peculiar problem:
              I have several MDBs that process ObjectMessages from queues and forward their payload (wrapped in another new ObjectMessage) to other queues, all of which are located within the same WLS server.
              Right now I'm adding a new MDB that gets messages from a remote Topic with a durable subscription, and forwards the payload to local queues after some processing.
              When the Topic is local as well, there is no problem. But when the Topic is set up in a remote machine, only the MDB that has the remote durable subscription works the way it should. It receives the remote message and forwards it to the corresponding local queue. But then the messages in those local queues dont get processed. The 'Messages Received' count rises and the 'Messages' count stays at 0, as if the messages had been correctly processed and acknowledged, but no onMessage() method is called besides the one from the MDB that has the durable subscription to the remote Topic (I can tell because there's no further processing from the queue those messages get put in). It's as if those messages were simply received and acknowledged without being passed to other MDBs by WLS.
              * All queue MDBs use Required container-managed transaction management and auto-acknowledge
              * All queue MDBs have default durability for their queue subscriptions
              * The topic MDB has a durable subscription stored in a filestore
              * Lookup of the remote Topic is done via JNDI
              Since the processing and forwarding of messages occurs the way it should when everything is local, I am inclined to believe one of two things:
              a) There's some issue with the way WLS treats messages (or even just payloads) when they come from a remote server
              b) WLS is doing something I'm not aware of when propagating a transaction that begins with the delivery of a message from a remote JMS Topic when it involves further forwarding of messages in local JMS Queues.
              Any help will be appreciated.
              regards,
              .munir estevane
              

    Is the durable subscriber forwarder rolling back its transactions?
              That would cause the behavior you describe (eg the message gets
              placed in the queue, but is never made visible). What do
              the pending counts on the destination queue look like?
              Munir Estevane wrote:
              > Using WLS 6.1 SP4 on winXP Pro boxes, I have come across a peculiar problem:
              >
              > I have several MDBs that process ObjectMessages from queues and forward their payload (wrapped in another new ObjectMessage) to other queues, all of which are located within the same WLS server.
              > Right now I'm adding a new MDB that gets messages from a remote Topic with a durable subscription, and forwards the payload to local queues after some processing.
              >
              > When the Topic is local as well, there is no problem. But when the Topic is set up in a remote machine, only the MDB that has the remote durable subscription works the way it should. It receives the remote message and forwards it to the corresponding local queue. But then the messages in those local queues dont get processed. The 'Messages Received' count rises and the 'Messages' count stays at 0, as if the messages had been correctly processed and acknowledged, but no onMessage() method is called besides the one from the MDB that has the durable subscription to the remote Topic (I can tell because there's no further processing from the queue those messages get put in). It's as if those messages were simply received and acknowledged without being passed to other MDBs by WLS.
              >
              > * All queue MDBs use Required container-managed transaction management and auto-acknowledge
              > * All queue MDBs have default durability for their queue subscriptions
              > * The topic MDB has a durable subscription stored in a filestore
              > * Lookup of the remote Topic is done via JNDI
              >
              > Since the processing and forwarding of messages occurs the way it should when everything is local, I am inclined to believe one of two things:
              > a) There's some issue with the way WLS treats messages (or even just payloads) when they come from a remote server
              > b) WLS is doing something I'm not aware of when propagating a transaction that begins with the delivery of a message from a remote JMS Topic when it involves further forwarding of messages in local JMS Queues.
              >
              > Any help will be appreciated.
              >
              > regards,
              > .munir estevane
              

  • Why cant apple track my stolen iphone if it connects to the internet after reset. the IMEI number stays the same so i dont understand why they just dont shut it off and call me and the police to inform me about the whereabouts of the phone

    Hi, my iphone was stolen around a month ago. After the phone popped up on find my iphone in central london the police decided to be really helpful and instead going to get it they closed my case. Since then it has been offline because the "lovely" individual who stole it obviously reset it. I was just wondering why doesnt apple track phones through the IMEI number. The number stays the same, so if the phone connects to the network they should be able to know that its my stolen iphone. I just dont understand why they dont do that. They have a huge ecosystem, and if someone signs in to my iphone with their itunes account (which they pretty much have to in order to use most of the phones features) the IMEI number gets associated with that perticular account. Would it not be possible for them to realize that its my stolen phone?
    Thanks to anyone that answers.

    Your carrier can lock the IMEI number, try contacting them. At least you'll have the satifsaction of knowing the theif can't use it anymore. My guess is Apple doesn't block IMEI numbers because they don't want someone selling a phone without record, and then reporting it stolen and causing problems that way. But that's just a guess, I feel for ya. Good luck either way, if it's a locked phone you should be able to call the carrier it's locked to and have the IMEI blocked.

  • I set up I cloud on my iphone 5 but now I dont get my yahoo.ca email??

    HELP I set up Icloud and now I dont get my yahoo mail I tried going into setting and adding an email but it just keeps saying server is not available

    Go to GarageBand and in the home screen click "Edit", then select a song and click the share button. Click on "Share song as Ringtone". Then click on "Your Ringtones", click in the "Edit" button and delete the Ringtone using the minus button.
    Hope it helped you!

Maybe you are looking for

  • Version 1.2.0.2998 (Windows XP) "Save As" feature request

    The "Save As" dialog does not remember the last directory saved to, nor can I find a way to customize the three Location buttons (Project, Home, Work) or add any additional Locations. If I save a package body as "R:\foo.pkb", the next time I "Save As

  • Production order reporting using COOIS

    Hi all I am using tcode COOIS for creating reports for Production orders. I have the following requirement I want to batch schedule the report using a variant which I have done. The report should automatically run every night at 12 am and it should a

  • Frozen Apple Logo

    I just got my hands on my roommate ipod with hopes to fix it. well.. the issue: so It turns on, the apple logo appears (no backlight) and it stays there. I have some clicks going on and it still sits there. It sits frozen in the logo screen for hours

  • System status ECUS in equipment

    Hi experts, I have a doubt:from standard when the system status in equipment is ECUS (BS22 I0188), for example after movement 601, do the stock informations in label 'Ser.data' must be update automatically by the system or not?i have not found refere

  • HT4972 i have an iphone 1 how do i get an ios 4 0r later...

    my i phone 1 wont download alot of apps it keeps saying that i need a better ios system..  when i plug it in to itunes it says i have the latest version how do i intall a later version so i can use all the apps in the app store?