From: Ralph Freese

Subject: RE: JLinker documentation

Date: 2001-8-16 16:42


I don't think that error was referring to the init() method. It was
complaining that it couldn't initial an instance of the class. 
The first thing to try is to just put "public" in front of the
constructor. 

 Ralph Freese              | E-Mail: <math.hawaii.edu at mailto:ralph>
 Department of Mathematics | WWW:    <http://www.math.hawaii.edu/~ralph>
 University of Hawaii      | Phone:  (808) 956-8595
 Honolulu, Hawaii 96822    | Fax:    (808) 956-9139

On Thu, 16 Aug 2001, Chris Perkins wrote:

> Wasn't the original exception one of missing an init() routine? Init() is used by Java Applets, not Java Applications. > > Are you attempting to run the class as an applet? If so, it needs to extend the Applet class or fully implement the minimum Applet methods: start() , init(), paint(Graphic g), stop(), and destroy() I believe. > > Normal classes don't need these methods. And Java Applications only need main(). > > > > > > At 10:09 AM 8/16/2001 , Jeff Dalton wrote:
> > > This information can be found in any Java book introducing the > > > language Java ...
> > > >Actually, I don't think it's all that obvious why the example didn't > >work, because, for instance, the following does work if I just compile > >and run it using Java: > > > >class Test2 { > > > > static class HelloWorld { > > HelloWorld (String str) { > > System.out.println(str); > > } > > } > > > > public static void main(String[] argv) { > > new HelloWorld("apple"); > > } > > > >} > > > >-- Jeff
> >