 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to run a java program
Compiling and running a java program is very easy after JDK installation. Following are the steps ?
- Open a command prompt window and go to the directory where you saved the java program (MyFirstJavaProgram.java). Assume it's C:\. 
- Type 'javac MyFirstJavaProgram.java' and press enter to compile your code. If there are no errors in your code, the command prompt will take you to the next line (Assumption: The path variable is set). 
- Now, type 'java MyFirstJavaProgram' to run your program. 
- You will be able to see the result printed on the window. 
Start learning Java with our Java tutorial from scratch.
Advertisements
 