0

My compiled jar applet file shows an exception: Could not find the main class: com.sun.deploy.uitoolkit.ui.NativeMixedCodeDialog.

Applet should've run under JRE 1.6, but I've JRE 1.7 installed as well. To force that I had to add <param name="java_version" value="1.6*"/> to the <object> tag.

So, I have HTML page, that uses JS to call applet method. Applet method looks like this

public String sayHello() { return "hello"; }

and JS function prints the returned by applet value.

When I run my HTML page, I have to choose, which version of JRE I prefer. If I choose JRE 1.7 everything works fine, but If I choose JRE 1.6, after I press the button that invokes JS function, browser stops responding, and after I close it, it gives me an error box:

Java virtual machine launcher.
Could not find the main class: com.sun.deploy.uitoolkit.ui.NativeMixedCodeDialog. Program will exit.
a3dsfcv
  • 1,146
  • 2
  • 20
  • 35

1 Answers1

0

Guess I've found the solution. I've replaced deploy.jar from jre7/lib with jre6/lib, because that class does not exist in jre6 at all. Dunno why, but even when I choose to run applet with jre6, liveconnect technology is still somehow connected with jre7.

Probably my solution would cause some critical mistakes in a future, but now it seems to work!

If some one have another solutions, they are welcome

a3dsfcv
  • 1,146
  • 2
  • 20
  • 35