- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 compile a java program
Compiling 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. 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).
The file is compiled and you can see MyFirstJavaProgram.class file generated in the same folder.
- Related Articles
- How to compile & run a Java program using Command Prompt?\n
- How to compile assert in Java?
- How to compile packages in Java
- How to Edit, Compile, and Execute a C++ Program?
- What happens in Java Program at compile time?
- How to compile and run the C++ program?
- How to Compile a Lua Executable?
- How to compile a Typescript file?
- Write a C program that won’t compile in C++
- C program that won’t compile in C++
- Pattern compile() method in Java with Examples
- How to compile unsafe code in C#?
- How to compile code using Arduino IDE
- How to compile 32-bit program on 64- bit gcc in C and C++
- How to compile a Python 3 app to an .exe using Tkinter?

Advertisements