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 Appletviewer
I am sure after following these steps your AWT (applet and Swing) programs will definitely run in the browser.
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.
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.
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.
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.
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.
0 Comments: