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
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
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.
Joined: Mar 04, 2002
I tried renaming the html, it didn�t work. Now, after setting the classpath, the appletviewer version executed works fine.