简体   繁体   English

出现错误“ bash:appletviewer:找不到命令”。

[英]Getting error “bash: appletviewer: command not found”.

I'm trying to learn Java and I'm having problems with the appletviewer command. 我正在尝试学习Java,并且appletviewer命令遇到了问题。 I am using openSUSE 11 and am able to compile and run normal java programs but when I issue the appletviewer command I'm getting the following error "bash: appletviewer: command not found". 我正在使用openSUSE 11,并且能够编译和运行普通的Java程序,但是当我发出appletviewer命令时,出现以下错误“ bash:appletviewer:not found”。

I have set the PATH variable in the .bashrc file. 我已经在.bashrc文件中设置了PATH变量。 so the problem is not that of the path. 所以问题不在于路径。 This can also be verified from the fact that javac and java commands are working normally. 这也可以从javac和java命令正常工作这一事实得到验证。 I have googled and tried many said resolution but none is working. 我已经用谷歌搜索并尝试了许多上述解决方案,但是没有一个工作。 I have even tried moving the files to the bin folder and running the command from there. 我什至尝试将文件移到bin文件夹并从那里运行命令。

So what may the cause of this? 那么,这可能是什么原因呢? Isn't appletviewer designed to work in linux? appletviewer不是设计用于Linux吗? And FYI I have replaced the OpenSDK and IcedTea versions with the jdk1.6.0_14 version from the sun site. 仅供参考,我已经从sun网站的jdk1.6.0_14版本中替换了OpenSDK和IcedTea版本。 Please help. 请帮忙。

Thanks Chris 谢谢克里斯

As a test, do the following: 作为测试,请执行以下操作:

$which java
$which appletviewer

Check to see if the paths are different. 检查路径是否不同。 If the second command gives no output, appletviewer may not even be installed (or can't be located by your system). 如果第二个命令没有输出,则可能甚至没有安装appletviewer(或系统无法找到appletviewer)。

You need to install java-1_6_0-sun-devel-1.6.0.u14-0.2.1 您需要安装java-1_6_0-sun-devel-1.6.0.u14-0.2.1

$ sudo zypper install java-1_6_0-sun-devel

You will find it in the openSUSE-11.1-Non-Oss repository. 您将在openSUSE-11.1-Non-Oss存储库中找到它。

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

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