java.lang.runtimeexception java.lang.reflect.invocationtargetexception

626 Views Asked by At

I have a Javascript program that call a Java program via Applet with the following command inside the Applet:

script.code = "InJava.class";

It was necessary to make a change in the Java program, and now it creates two classes: InJava.class and InJava$1.class

Now, when I run the program in Javascript, the program does not answer anything.

If I change the statement to:

script.code = "InJava$1.class"

It returns the following error:

runtimeexceptionjava.lang.reflect.invocationtargetexception

How must I stated in the Javascript program?

Must I change something in my Java program?

The Java program is below:

Java Program

public void sayHello() throws IOException {
  java.io.FileInputStream fis =  AccessController.doPrivileged(new   PrivilegedAction<FileInputStream>() {
  public FileInputStream run() {
     try {
          return new FileInputStream(parametro);
      } catch (IOException e)  {
          String retorno_exc = e.toString();
      }
      return null;
    }
  });
0

There are 0 best solutions below