3

Since today, my Eclipse fails to load JSObject. This code was previously working OK. Any ideas how to fix it? I do have simple netscape.jar in the classpath.

Here is the code that now fails to work:

import netscape.javascript.*;

  ...

    try {
        doc = (JSObject) JSObject.getWindow(app); //.getMember("document");
    } catch(JSException e) {
        doc = null;
        Debug.error("DBscorm().<init>: Exception " + e);
        throw(e);
    } catch(Exception e){
        doc = null;
        Debug.error("DBscorm().<init>: Exception " + e);
        throw(e);
    }
BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Tom
  • 6,725
  • 24
  • 95
  • 159

2 Answers2

3

In every JDK subfolder is a file called plugin.jar

Get this file and add it to your Eclipse classpath. This will make it work - guaranteed.

Dieter
  • 56
  • 1
  • 4
0

A couple of possibilities:

  • Do you have a missing import statement? Try organising imports with CTRL+SHIFT+O
  • Is the netscape.jar still configured as a library for the project? (Project Properties->Java Build Path->Libraries tab, then click on "Add JARs..." if necessary)
Rich
  • 15,602
  • 15
  • 79
  • 126