Two Laptop Bag
The moose likes Beginning Java and the fly likes appletviewer doesn�t work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "appletviewer doesn�t work" Watch "appletviewer doesn�t work" New topic

appletviewer doesn�t work

Sigfred Zamo
Ranch Hand

Joined: Mar 04, 2002
Posts: 44
Hi, I�m a very beginner java programmer, before starting running applets, I need to know how to use appletviewer. I use Win2000 and new sdk 1.4.
I have Oracle 8i client instaled and some more Oracle development tools.
I copied the example in the java tutorial exactly as it appears in the web page.
I can see the Hello World! example from a web browser, but not using appletviewer, the applet starts but I get 'Applet not initialized' in it, and in DOS console I get this:
c:\myjava>appletviewer hello.html
JAR caching enabled
Cache directory: C.\orant\jdk\bin\..\jcache
Maximum cache size: 20971520 bytes
load: class HelloWorld.class not found.
java.lang.ClassNotFoundException: HelloWorld
at ...

It seems to be that appletviewer doesn�t find the class, but it is in the same directory, and changing classpath doesn�t work.
Anyone can help me!
Thanks in advance.

Sigfred Zamo<br />Software Development<p><a href="" target="_blank" rel="nofollow">My page</a>
Sigfred Zamo
Ranch Hand

Joined: Mar 04, 2002
Posts: 44
The PATH environment variable was not set well, the appletviewer version I were running was old, changing the order in the PATH variable solved the problem.
Anyway, I don�t understand why it didn�t work, does anybody know it?
pam rowell

Joined: Jan 21, 2002
Posts: 7
tyr renaming your html document the same name as your class. java is very picky about that. if your class is then name your html HelloWorld.html or HelloWorldApplet.html. also make sure that you created an applet.
Sigfred Zamo
Ranch Hand

Joined: Mar 04, 2002
Posts: 44
I tried renaming the html, it didn�t work.
Now, after setting the classpath, the appletviewer version executed works fine.

Thanks anyway.
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
Please read JavaRanch's naming policy and edit your profile to change your displayed name to conform. Thank you.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
I agree. Here's the link:
subject: appletviewer doesn�t work
jQuery in Action, 3rd edition