Results 1 to 3 of 3
  1. #1
    miche26 is offline Member
    Join Date
    Sep 2012
    Posts
    11
    Rep Power
    0

    Post Running Java in cmd

    I am new to Java and trying to it up to run and execute programs from cmd. Everything goes fine until it reaches the point where i type (for ex my app name is "app")

    app.java


    then it ask me which program i want to run it in . The options are notepad, wordpad and browse for a file.

    it compiles and everything because i had an error on it before and it told me . I fixed it and now it just ask me what I want to open the app in.

    Its a simple string app... to display "helloworld" so I remember in class it was just suppose to output Helloworld in the cmd itself

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Running Java in cmd

    This will do nothing:

    app.java

    Since all you're doing is typing in the name of a Java file and nothing more, no commands, no nothing. To run it, you would do something like:

    java app

  3. #3
    miche26 is offline Member
    Join Date
    Sep 2012
    Posts
    11
    Rep Power
    0

    Default Re: Running Java in cmd

    wow thanks. that simple. I wonder why the book said the type it as app.java?

Similar Threads

  1. Replies: 7
    Last Post: 12-18-2011, 04:13 AM
  2. Replies: 2
    Last Post: 09-21-2011, 09:33 AM
  3. Replies: 13
    Last Post: 06-29-2011, 07:25 AM
  4. Replies: 0
    Last Post: 08-26-2009, 01:03 PM
  5. running java
    By Winarto in forum New To Java
    Replies: 1
    Last Post: 08-22-2008, 06:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •