This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "appletviewer doesn�t work" Watch "appletviewer doesn�t work" New topic
Author

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


Sigfred Zamo<br />Software Development<p><a href="http://www.sigfredo.ingenieros.net/index2.html" 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?
Thanks.
Sig
pam rowell
Greenhorn

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 HelloWorld.java 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.
Sig
Marilyn de Queiroz
Sheriff

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


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: appletviewer doesn�t work
 
Similar Threads
JDBC, Oracle Thin Client thru Applet
Class Not Found/Loaded with Applets in WSAD 5
Connect to Oracle database
java applet error (new to this sorry)
problem with -cp