Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JDBC-applet works in appletviewer, not in IE

 
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • 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
 
    Bookmark Topic Watch Topic
  • New Topic