简体   繁体   English

为什么我收到“找不到appletviewer”错误?

[英]Why am I getting 'appletviewer not found' error?

I have written a program appletExample.java .我写了一个程序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请记住,要将java文件作为 appletviewer 的参数运行,它需要具有特殊格式,并在 Java 源代码中注释掉 applet 标签

I think jdk 16 has eliminated applets so one who would like to run applets download jdk 8 version.我认为jdk 16已经淘汰了小程序,所以想要运行小程序的人下载jdk 8版本。

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由于 jdk 15 也没有小程序,如果您想检查您的版本是否支持小程序查看器或不执行此操作:转到windows> program files >java > jdk 1.5.05 > bin

So in that folder if you find appletviewer.exe then your version supports applets.因此,在该文件夹中,如果您找到appletviewer.exe,则您的版本支持小程序。

If you don't find that thing then you must go and download jdk 8 version or others which support applets.如果你没有找到那个东西,那么你必须去下载 jdk 8版本或其他支持小程序的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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