comp.lang.ada
 help / color / mirror / Atom feed
* ada-java newbie question: getting java.lang.NoSuchMethodError
@ 1997-11-30  0:00 Terry J. Westley
  0 siblings, 0 replies; only message in thread
From: Terry J. Westley @ 1997-11-30  0:00 UTC (permalink / raw)



I have a VERY simple Ada-Java applet which contains only a paint
method.  This works fine in Win95 appletviewer, but gets
java.lang.NoSuchMethodError when running in MS Internet Explorer.
I've added update, init, and main methods, but still get the
same error.

What method am I missing and how do I see java error log in MSIE?

Source code is below.  I am using ObjectAda 7.1 on Win95.
I have set PATH and CLASSPATH in AUTOEXEC.BAT:
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\USR\BIN;C:\JDK1.1\BIN
SET
CLASSPATH=.;C:\WINDOWS\JAVA\CLASSES\CLASSES.ZIP;C:\PROGRA~1\AONIX\OBJECTADA\
JAVALIB\ADACLASS.ZIP

-- 
Terry J. Westley, Principal Engineer
Calspan SRL Corp, P.O. Box 400, Buffalo, NY 14225
westley@calspan.com   http://www.calspansrl.com/


-------------------- HelloWorldApplet.ada ---------------------------
with java.applet.Applet; use java.applet.Applet;
with java.awt.Graphics;  use java.awt.Graphics;
with java.lang.String;   use java.lang.String;

package HelloWorldApplet is

   type HelloWorldApplet_Obj is new Applet_Obj with record
      null;
   end record;
   type HelloWorldApplet_Ptr is access all HelloWorldApplet_Obj;
   
   procedure paint  (this : access HelloWorldApplet_Obj; g : Graphics_Ptr);

end HelloWorldApplet;

with Interfaces.Java;
with java.io.PrintStream; use java.io.PrintStream;
with java.lang.System; use java.lang.System;

package body HelloWorldApplet is

   function "+" (s : String) return String_Ptr renames Interfaces.Java."+";

   procedure paint (this : access HelloWorldApplet_Obj; g : Graphics_Ptr)
is
   begin -- paint
      println (stdout, "paint");
      drawstring (g, +"Hello Java World!", 5, 25);
   end paint;

end HelloWorldApplet;

------------------------ HelloWorldApplet.html ------------------------
<html>
<head>
<title> Hello World Applet </title>
</head>
<body>
My HelloWorldApplet says:
<applet code="HelloWorldApplet.class" width=150 height=25>
</applet>
</body>
</html>





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-11-30  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-30  0:00 ada-java newbie question: getting java.lang.NoSuchMethodError Terry J. Westley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox