08/02/2023

How to Run Java Applet Program in CMD Using Appletviewer

 How to run the java applet program in cmd using applet viewer in 5 steps a pictorial solution with a command or how to run applet program in java using command prompt or how to run java applet program in cmd all the problems solved in just 5 steps with pictorial representation. There are only 5 steps, follow all step by step.


How to Run Java Applet Program in Cmd Using Applet Viewer

How to Run Java Applet Program in Cmd Using Applet Viewer


I am sure after following these steps your AWT (applet and Swing) programs will definitely run in the browser.

Step 1: Open Command Prompt


Press WIN+R one popup will open (as you can see below picture) in the left bottom corner Type "CMD" and hit enter from the keyboard.

Open Command Prompt

Step 2: Locate the Java Applet Program Location


Now go to your program location with the help of the "cd" change directory command enter the Folder or Directory Name As you can see here my program is located in C:\Users\GHANENDRAY\Desktop\Docs\assignment\Java lab\RUNNING ASSIGNMENT. This is the directory of the program where my program is saved. In the case of your directory may be different. 

Locate the Java Applet Program Location

Step 3: Compile the Java Applet Program


You are in the program directory here Type this command "javac filename.java" and press enter where filename.java is the program name and javac for compiling a program. Wait for a moment until your program is compiling.

Compile the Java Applet Program

Step 4: Run the Program in Java Applet


Now if your program is compiled successfully then no error will occur if there is an error in the program all errors will be shown so first fix all these errors and again Type "appletviewer filename.java" and hit enter. Here applet viewer is used to run the applet program as you can see below.

Run the Program in Java Applet

Step 5: Java Applet Program Output


This is the last step here a new popup window occurs and displays the output of your program. As you can see in my case program is ready for work as shown below.

Java Applet Program Output

Similar to Java Applet Projects


Previous Post
Next Post

post written by:

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.
Follow Me

0 Comments: