tags:

views:

417

answers:

2

Hi, I'm trying to learn Java and I'm having problems with the appletviewer command. 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".

I have set the PATH variable in the .bashrc file. 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. 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.

So what may the cause of this? Isn't appletviewer designed to work in linux? And FYI I have replaced the OpenSDK and IcedTea versions with the jdk1.6.0_14 version from the sun site. Please help.

Thanks Chris

+1  A: 

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).

Dana the Sane
yes, i think it is the issue. which appletviewer is saying which: no appletviewer in (/home/chryste/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/kde3/bin)So I copied appletviewer to /usr/bin directorynow it is giving the errorappletviewer: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directorySo I think this is not the way to resolve it. Sorry if I am too dumb. I'm just a beginner. How can I solve this issue?
Christy John
Try reinstalling using Robert's suggestion. Since you've relocated the bin, it can't find the libraries it needs to work. A proper install should avoid all of these pathing issues altogether.
Dana the Sane
A: 

You need to install 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.

Robert Munteanu