4
C:\Users\ms536\Desktop\java>appletviewer awt_ex.java
'appletviewer' is not recognized as an internal or external command,
operable program or batch file.

How can I fix this error?

Mansi Sharma
  • 41
  • 1
  • 1
  • 2
  • 1
    ok. and your actual question is? – Stultuske Feb 20 '19 at 12:53
  • Possible duplicate of [javac is not recognized as an internal or external command, operable program or batch file](https://stackoverflow.com/questions/7709041/javac-is-not-recognized-as-an-internal-or-external-command-operable-program-or) – Kebab Programmer Feb 20 '19 at 12:54

2 Answers2

10

I can think of three possible explanations for this:

  1. You may have not set the command search path ($PATH) correctly. This is a common for people who are new to Java; see javac is not recognized as an internal or external command, operable program or batch file

  2. You may be trying to use appletviewer in Java 11 or later. This won't work. Applet support was deprecated in Java 9, and was removed entirely in Java 11; see https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8200146.

  3. You may have installed a JRE rather than a JDK. The appletviewer is (was) only available in JDK installations.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
0

Try to install java 8 , set the path and then try to run the program again Because applets are now obsolete and not in use any more. So their support has been removed in the latest versions

Adarsh
  • 116
  • 6