How to execute Java file in command prompt
- Install java JDK from Oracle (any latest )
- Open cmd Prompt ( ie ., In start >Search Box > Type "cmd" (without quotes)
- In Command Prompt Type >Java -version (You'll get the version number)
- In Cmd prompt Type > set path=Path where Jdk is installed\bin;
- Now navigate to the file structure in Command prompt where the java file is residing
- Type >javac file_name.java
- Type >java file_name
No comments:
Post a Comment