-
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
-
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
-
Re: Running Java in cmd
wow thanks. that simple. I wonder why the book said the type it as app.java?