简体   繁体   中英

Why am I getting 'appletviewer not found' error?

I have written a program appletExample.java .

c:/users/set path = "C:\Program Files\Java\jdk-16\bin"
c:/users/desktop/jp>appletviewer appletexample.java

The error is"

'applet viewer' is not recognized as an internal or external command,
    operable program or batch file.

I am getting this error. But set path is also correct way but why this error has occurred? Could anyone explain to me?

As other people have said, applets are history really but try the following:

(cd to wherever appletexample.java is)
set PATH="C:\Program Files\Java\jdk-16\bin";%PATH%
appletviewer appletexample.java

Bear in mind that to run a java file as an argument to appletviewer, it needs to have a special format with commented-out applet tags in the Java source

I think jdk 16 has eliminated applets so one who would like to run applets download jdk 8 version.

As jdk 15 also doesn't have applets if you want to check your version support appletviewer or not do this thing: Go to windows> program files >java > jdk 1.5.05 > bin

So in that folder if you find appletviewer.exe then your version supports applets.

If you don't find that thing then you must go and download jdk 8 version or others which support applets.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM