• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

appletviewer doesn�t work

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic