Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

appletviewer doesn�t work

 
Sigfred Zamo
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sigfred,
Please read JavaRanch's naming policy and edit your profile to change your displayed name to conform. Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic