• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC-applet works in appletviewer, not in IE

 
Hieroni Friscus
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
I've written an applet that connects through JDBC to a database (mSQL) that resides on the server the applet was downloaded from. My applet works fine in appletviewer and in Forte (the program I created the applet with) but not in IE5 (I didn't try Netscape)
the error that is trown is : java.lang.ClassNotFoundException: java.util.Map
Could anybody help me solving this problem?
Thx
Hieroni
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm... I think that this may be because IE doesn't include an up-to-date JVM that includes java.util.Map... Yep... Map was only added in Java 2... I think IE only supports up to something like Java 1.1.2 or 1.1.8... So you'll need to do one of two things :

1.) Include your class and the java.util.Map ( and all the classes that Map needs ) in one jar file. This make your applet download bigger (and thus take more time), but any user that has a java-enabled browser will be able to view your applet. To do this you would have to extract the class files for Map ( and any other classes that Map needs that aren't provided ) from the rt.jar file provided with java ( I think it's in the /jdk1.3/jre/lib/ directory ) and then jar these up with your applet. For more help with using jar, search on JavaRanch or the Sun website for jar... I know that Sun has a pretty good guide to using it.

2.) Use the Java 2 plug-in and HTMLConverter ( both provided freely by Sun ) to force the browser to use the new Sun Java 2 VM instead of the crappy old M$ Java 1.1.2 VM provided with IE. In this case, anyone who wants to view your applet will have to download and install the Java 2 plug-in if they have not previously done so. For help on how to make the plug-in work in your browser, and how to use HTMLConverter on your web page, search in this forum further, or search for the plug-in on Sun's website... there are lots of references on how to do it.

HTH,
-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic