Forum Stats

  • 3,855,546 Users
  • 2,264,521 Discussions
  • 7,906,059 Comments

Discussions

NoClassDefFound defies -target1.1 fix

843807
843807 Member Posts: 46,582
edited Sep 25, 2002 12:44PM in Java Applet Development
I have created a library of beans used to build a series of applets. While they work fine on newer browsers, I must support some pretty old stuff. On the older browsers, I get an error when loading some of the classes that recieve action events. A typical message is as follows:

# Verifier error binarylabs/mankiw/equation/MXEquation.sliderValueChanged(Ljava/awt/event/ActionEvent;)V: Cannot find class java/awt/event/ActionEvent

Where, obviously, sliderValueChanged is a method that takes an ActionEvent as an argument. I assume the L before the class name is an indication that a reference is being passed.

On at least some of the machines, I have checked the VM's class files and have verified that ActionEvent is there. I have confirmed that it is not being loaded by looking at the memory map.

I had been getting other errors before I used -target 1.1 in the javac command, so I am confident that that is working correctly. However, just to be sure, I downloaded the jdk 1.1.8 sdk and compiled my classes with that instead, and I continue to get the same error.

I then tried -target 1.1.2 in my 1.4.1 compiler but it did not accept that argument at all and did not compile.

Am I barking up the wrong tree here? The fact that I can verify that ActionEvent is on the target machine but it won't load is driving me nuts. My next step will be to use the jar files from one of these old browsers instead of the jdk classpath when I do a build, on the assumption that the signature of the class has changed during the evolution of the 1.1 JDK.

I appreciate any help I can get on this one!

Jerry Seeger

Comments

  • 796365
    796365 Member Posts: 8,041
    One form of the constructor of ActionEvent is new with 1.4;
    the getWhen method is also new.

    I assume that you're not using either one...
  • 843807
    843807 Member Posts: 46,582
    No I'm not, however I think that some of my analysis was faulty. I believe that in at least one case the VM (Netscape 4.0.5 for Windows) was not using the class libraries that I had inspected, and despite being a 1.1.x VM does not support ActionEvents at all.

    I'm still scratching my head about Internet Explorer for Mac when running MRJ 2.1, which definitely does support Action Events. The error information I get back is very sketchy, however, and it may be some other class not being found.

    So my next steps are to figure a way to get a stack trace out of the Mac VM and/or talk the client out of requiring support for ancient VM's. Wish me luck.
This discussion has been closed.