Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help!!! Applet can't be instantiated Error

 
sam patel
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am opening an applet in IE. But All i am getting is blank frame.
When i move my curser over the applet I am reading this error
********
loads: com.blny.scan.db.ScanViewApplet can't be instantiated
********
Any help or suggestions are always appreciated.
Thanks in advance.
 
Peter Gragert
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You get this behaviour if IE uses a different JVM than you compile with.
E.g. You compile with Java 1.4 (too the appletviewer) but IE uses version 1.3!
Get and try the 'missing' version
If you are lucky this is the problem!
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sam,
If the problem Peter explains is actually your problem you can just compile the code using the target keyword.

-target version
Generate class files that will work on VMs with the specified version. The default is to generate class files to be compatible with both 1.1 VMs and VMs in the Java 2 SDK. The versions supported by javac in the Java 2 SDK are:
1.1
Ensure that generated class files will be compatible with 1.1 and VMs in the Java 2 SDK. This is the default.
1.2
Generate class files that will run on VMs in the Java 2 SDK, v 1.2 and later, but will not run on 1.1 VMs.
1.3
Generate class files that will run on VMs in the Java 2 SDK, v 1.3 and later, but will not run on 1.1 or 1.2 VMs

Regards,
Manfred.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic