What happens when a program name is typed on the command line?

I mean I know what HAPPENS but I need to know the sequence of events. How would I describe it?
i.e. java MyProg

What is this? Are you taking a take-home exam on basic computer operation? You're asking very similar questions about broad things.
Anyway:
1) the shell parses the command line. it gets a sequence of tokens which are basically just individual strings
2) the shell identifies which tokens on the command line are executables, and which are arguments to those executables. It also figures things out like how to chain the output of one program to the input of another, although this doesn't apply in the example you gave. In your example, "java" is the executable and "MyProg" is a string to pass to the executable as an argument.
3) The shell then searches for the actual program file corresponding to the token that refers to an executable. The shell looks at the PATH environment variable to find a list of directories; it then looks in each directory until it finds the program file. So the program file here would be "java.exe" on a windows system.
4) It then spawns off a new process to run the java program, passing the MyProg string to it as an argument.
Does that help?

Similar Messages

  • HT204406 what happens when you don't have WiFi all the time?

    When using iTunes match and you are not in a WiFi zone, how do you hear your music?

    From Apple's iTunes web page:
    Will iTunes Match songs download over 3G on my iOS device?
    Yes. Go to Settings > Store on your device. Turn on Use Cellular Data. If you’d rather download over Wi-Fi, turn it off.
    Of course, that will count against your cellular data plan limits.

  • What happens when i sync my iphone? does the info on my phone overwrite the info from my previous sync? for example, when i delete some apps and messages on my phine, and i sync it, do these deleted items get restored?

    please help!:)

    See this excellent user tip from Kappy explaining "Other":
    https://discussions.apple.com/docs/DOC-5142
    You probably have one or more corrupt apps.  Make sure you do not simply restore all your apps ... choose which ones you keep.

  • TabNavigator - How to change what happens when a user clicks a tab

    I am using a TabNavigator in my Flex application and I'd like
    to be able to change what happens when a user clicks a tab on the
    TabNavigator. I'd like to be able to handle the click on the tab
    myself and stop Flex from perfoming it's default actions. Anyone
    have a clue how to do this? Any help would be much appreciated!
    Mike

    Yeah, in the following code, the changeHandler has an effect
    but the click effect does not:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    private function clickHandler():void{
    accounts.setStyle("fontSize",20);
    stocks.setStyle("fontSize",20);
    futures.setStyle("fontSize",20);
    private function changeHandler():void{
    accounts.setStyle("fontSize",7);
    stocks.setStyle("fontSize",7);
    futures.setStyle("fontSize",7);
    ]]>
    </mx:Script>
    <mx:TabNavigator borderStyle="solid"
    click="clickHandler()" change="changeHandler()">
    <mx:VBox id="accounts" label="Accounts"
    width="300"
    height="150">
    <mx:Label text="Accounts"/>
    </mx:VBox>
    <mx:VBox id="stocks" label="Stocks"
    width="300"
    height="150">
    <mx:Label text="Stocks"/>
    </mx:VBox>
    <mx:VBox id="futures" label="Futures"
    width="300"
    height="150">
    <mx:Label text="Futures"/>
    </mx:VBox>
    </mx:TabNavigator>
    </mx:Application>

  • What happens when your lock button stops working?

    what happens when your lock button stops working?

    The world end.
    Seriously, nothing "happens". 
    are you asking how to fix it?  If so, why don't you just ask?

  • How to rename in batch.  What happens when I follow instructions is that I get 8909808001.jpg  for 1.  All I want is 1.

    How to rename in batch.  What happens when I follow instructions is that I get 8909808001.jpg  for 1.  All I want is 1.

    Provide the name of the program you are using so a Moderator may move this message to the correct program forum
    This Cloud forum is not about help with program problems... a program would be Photoshop or Lighroom or Muse or ???

  • What happens when the CC trial ends? What happens when offline?

    I need Lightroom to work offline on my laptop. What happens if I need to sign in to CC when there is no interned connection and what happens when the CC trial ends on both my laptop and desktop?

    Thanks for answering. I have the standalone version of Lightroom 6 on my Windows 7 64 bit desktop. A number of times when have tried to open the program, the Adobe Application Manager has popped up requiring me to sign in even though I had not knowingly signed out. Lightroom will not launch unless I am signed in. Frequently when Lightroom launches, I see a "Server Busy" message telling me to "switch to the other program" without telling me which program to switch to. I have pinned the AAM to my notification area and have unchecked the "Show OS Notifications box" to see if the "Server Busy" message goes away. So far everything seems to be okay
    Again, thanks for answering me

  • What happens when error record

    Hi ABAP Gurus,
    Iam phaneendra can anybody explain in detail
    what happens when there is an error record exist while updating a session in session method and in call transaction.
    ie, out of 10 records 7th one is error let it be then what happens to 6 redords that 7th record and 8th 9th 10th records.
    and also what is assychronous and synchronous
    process .thatly in updation.
    good answers( helpful answers must be rewarded)
    regards,
    phaneendra.

    Hi,
    In Session Method all the 9 records will be updated except the &7th record(error record). u can get the error information in SM35.
    In call tranasction method it depends upon the mode(A,N,E). In all screen mode system will stop at 7th record and all the previous 6 records will processed. In No screen mode all the 9 records will be updated except the 7th record(error record). and track the error u have to use BDCMSGCOLL in ur program(for call transaction).
    Asyn-- System does not wait for Acknowledgement. but in Syn--- System waits for acknow.  For this reson Asyn process is fast as compare to Sync.
    Thnaks,

  • What happen when i compile a java prog.

    I, to an extend know how to code using java. However I don know what really happens after compiling a java prog and what happens when i run it.. what is JVM, JDK, JIT etc., means.. What is a class file and a jar file and a war file.. I'm confused.. ANy help is really appreciated..
    Thanks in advance..
    regards.

    Java source is compiled into "portable byte code" (a class file).
    The JVM (virtual machine) interprets the "portable byte-code" into "machine instructions"... The actual instructions may vary from platform to platform, but the contract is they will allways have the same effect.
    JIT stands for "Just In Time"... as usually means "JIT-compiler"... which is fancy pants name for an interpreter.
    Google will tell you more.

  • What happens when an exception occurs at finalize method ?

    What happens when an exception occurs at the time of cleaning objects in finalize methods?
    Will program crashes?

    1.) Why don't you try it? You can simply throw your own exception.
    2.) For this kind of questions the JVM specification is a good resource, for your concrete problem the chapter about finalization might be interested (look for the sentence starting with "If an uncaught exception ...").

  • What happens when subscription ends

    Good Morning,
    I have cancelled  my dw subscription, just a few days ago, ( it was a cost thing) So today i clicked to see what happens when I open it, it opened but a screen just says to go to my account to straight in  out payment info, but also say you have 66 days, for what?  If anyone else has cancelled what have they found, I have moved onto Coda 2 and seems good, I do most of my own coding, Thx RJ

    Sounds like you paid ahead of time a bit, and canceled with 66 days left on your subscription. You will still be able to use the program for the remainder of the time you have paid, but get a reminder that your subscription is expiring.
    After that paid time runs out, you won't be able to use the program at all until you re-up the subscription.

  • What happens when someone forwards photostream invite via email

    What happens when someone forwards photostream invite via Email.
    I would ultimately like to send directly to parents of my kid's sport team - however the manager says the distro changes alot and it would be best if I send her the invite and she forwards off. 
    I'm sure there are a mix of IOS and Android users but I'd like the IOS users to benefit from having it in their iPhoto programs, and the others can opt to go to the URL provided in the invite.  Are there any issues with the manager forwarding the Photostream invite?  Any experiences to share when sharing photos taken at a game?
    Thank you in advance.

    You will need to create a Public Photo Stream since many of the parents will be on PCs. Here's how:
    With that scenario the email will look like this:
    The link at the bottom will take the user to the website.  Or you could go to the website yourself, copy its URL and incliude that in an email to the manager for forwarding on.
    OT

  • What happens when you get Error 1905??

    ERROR 1905 MODULE C:/PROGRAM FILES/ITUNES/ITUNESMINIPLAYER.DLL
    FAILURE TO UNREGISTER
    HRESULT-2147200472
    CONTACT YOUR SUPPORT PERSONNEL
    Okay...so what do I do? After this it goes to "stopping services", but says it is unable to do that. Then when I open I-tunes it says that the part of the program where the computer connects to the ipod was not installed correctly. this is soooo frustrating. my brother's had an ipod shuffle for about 2 years so itunes was already installed. i was just trying to update it so my ipod video could be read.
    iPod with Video   Windows XP  

    Sorry no but here is some info anyway,
    We increased MaxPermSize from 192 to 512
    We also increased min and max JVM Heap size to 768 and 2048 respectively.
    Since then I think we have not experienced this problem more than once.
    We also have one server with the default parameters and it seems to work fine.
    I believe that size, and number of simultaneous request/responses have an impact  on this.
    We will now install the latest updates and after that decide whether to start logging jvm activities or not.
    Best regards
    Lennart
    Från: Neo Rye [email protected]
    Skickat: den 28 november 2012 06:44
    Till: Lennart Risfelt
    Ämne: what happens when you  get a "PermGen space null" error?
    Re: what happens when you get a "PermGen space null" error?
    created by Neo Rye<http://forums.adobe.com/people/Neo+Rye> in ColdFusion - View the full discussion<http://forums.adobe.com/message/4879436#4879436

  • HT1976 what happens when you cannot get a 4g network

    what happens when you have a 4g phone and you are in an area that does not have 46 reception

    There really aren't any special settings for that sort of thing. What does your phone say just to the right of your carriers name when you don't have 4G coverage?

  • What happens when you transfer contents?

    I have my desktop backed up on a MyPassport Ultra. This computer runs Windows Vista Home Premium.  I am in the process of setting up a new laptop with Windows 8.1 which I understand about this || much. What happens when you transfer the contents? I understand that you plug the MyPassport into the laptop and it should direct me how to install what has been backed up. But what will it look like on the new computer? Will the folders be in the same directories? Where will they be stored? And can someone confirm what will NOT be backed up and transferred? I was told it would be programs that I installed, such as Paint Shop Pro, etc.
    Would be very grateful for any assistance

    Well! That was so much more painless than I thought, LOL. The transfer went well and I had no problems finding the files, but I apparently have not set the rules for what to copy, right. I understand from p.46 of the manual, Backing Up Files, that you select what to copy from the drop down menu under the PC/Dropbox icon. In my case that only offers Acer  (C, Data (D, and MyPassport. I chose Acer (C, thinking it copies everything on the computer except program files. But it did not copy a specific category (?) named in this image "Working".  Can you tell me what I've done wrong so I can correct it before I lose something? It would be my luck.

Maybe you are looking for

  • Mac 10.9.5 trying to launch Illustrator CS6 for first time and prompts Java even though I have Java 8 installed.

    Mac 10.9.5 trying to launch Illustrator CS6 for first time and won't launch, prompts for Java 6 even though I have Java 8 installed! Apple says Java 6 is very insecure and not to use it.  I have the latest Java installed.  Why won't Illustrator launc

  • Forms Recognition Line items validation

    Dear all I'm working on a Forms Recognition POC whose delivery date is on 10/10. I want to disable the validation of the amounts from the line items and total amount, how can I do so? Thanks and Best Regards

  • X-Fi Notebook Audio SPDIF passthrough.

    &. Hi there, I have been trying to figure out on how to use optical out for SPDIF passthrough. Was wondering in using my laptop as a media center for the kids and wanna use the SPDIF passthrough option in XBMC (DD & DTS on my AMP). But, it doesn?t se

  • Cleaning unused files from a session audio folder

    I'm currently cleaning up unwanted files from my computer to free up space.  I think I remember seeing a post about a program that will help me clean up the session audio file folder.  I just need someone to point me in the right direction. Thanks

  • Send Mail from Form (DW CS4)

    I have created a site in Dreamweaver CS4. I have a page with a form and a submit button. I will eventually move this into Cold Fusion, but in the meantime when the end user hits "submit" I want their info to come to my email. Any ideas or recommendat