File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Applet notinited - PROBLEM: Can't run applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet notinited - PROBLEM: Can Watch "Applet notinited - PROBLEM: Can New topic
Author

Applet notinited - PROBLEM: Can't run applets

Dave Woods
Greenhorn

Joined: Aug 02, 2003
Posts: 4
Well, I posted this identical problem on a SUN forum but no reply yet. Here it is:
I have J2SDK; it's installed and I'm using it every day to write beginner Java applications. BUT I can't run applets in my browser (I'm using Windows XP with IE 5) or even from the DOS prompt with the "appletviewer" command. When I type: appletviewer appletname.html
I get the message: 'appletviewer' is not recognised as an internal or external command, operable program or batch file.
So I followed the link to GET IT NOW on www.java.com/en/index.jsp and it did the "Checking configuration" thing for an automatic download and left me with the Exception: Applet com.sun.java.Main notinited
Great, so they want my system to use an applet to install the software required to run applets(!?@#*?) So I tried the manual download and see that it's just JRE, which I have a recent copy of anyway. I know it works because I use it applications; it just won't work for applets. And since I've re-downloaded and reinstalled it a couple of times there's definitely not something wrong with the download file.
I am getting very irritated since I've been trying to sort this out for several weeks now. To add to this, it's not just my home pc that has this problem, but my one at work too (Windows 2000)!
Matthew Orral
Greenhorn

Joined: Jul 27, 2003
Posts: 11
Does this problem also happens with netscape/mozilla browsers?
First of all, update ie 5 to ie 6 and download and install http://ftp.yars.free.net/pub/software/java/j2sdk-1_4_2-windows-i586.exe
(The same file on sun servers is dammaged)
Go to control panel, click on java plugin, and set it as the jre for all the browsers you want (IE,netscape...)
In XP , set PATH correctly to point to j2sdk1.4.2\bin directory by clicking start-> Control Panel -> System -> Advanced Options -> variables , (or something like that).
set CLASSPATH if you want (i recommend adding "\." to CLASSPATH)
After that , open cmd.exe and try running appletviewer with the html file you want.
You can also try running some of the applets listed here : http://www.reed.edu/~mcphailb/applets/
Dave Woods
Greenhorn

Joined: Aug 02, 2003
Posts: 4
Thanks Matthew,
I don't have any other browsers loaded and am not about to try do download any now. My line is pretty slow, so I can't just download others or the latest SDK from home though can do so from work next week. (But will it help? I'm on j2sdk1.4.1_01 already.)
My home pc is on IE6 not 5 as I said by mistake (my work one is ie5). I've set the path correctly now and added \. to the classpath list, but still get the "notinited"/applet not initialised exception. Any more ideas?
Much appreciated,
DW
Matthew Orral
Greenhorn

Joined: Jul 27, 2003
Posts: 11
well, you don't need j2sdk1.4.2, but it could be a problem with the java installation (perhaps corrupted jars),however the sdk you've got looks good.Did you tried changing java plugin to be set as ie jre? Because i got a lot of strange problems like yours with the crapy Virtual machine from Microsoft , until i used java plugin.
Sorry, no new ideas for the moment...
Caven Wang
Ranch Hand

Joined: Jul 07, 2001
Posts: 31
Yes, I agree that u only need jre, not JDK


@_@ Life is so nice!
Dave Woods
Greenhorn

Joined: Aug 02, 2003
Posts: 4
Thanks for your help guys, I'm coming right.
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
Thanks

I think if your applet was running and then you get this problem then try to change the version.


"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
 
wood burning stoves
 
subject: Applet notinited - PROBLEM: Can't run applets