The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

TestBed problem

Posted by Hunter Milligan on September 05, 2000 at 12:38 PM

> Hi
> The class TestBed$Tester runs ok. I think there is a typo in your program. If still it doesn't run then please send me the actual program you are compiling .
> Thanx
> Kishori

Thanks for the quick response. Here's the source I'm using:
//: c08:TestBed.java
// From 'Thinking in Java, 2nd ed.' by Bruce Eckel
// www.BruceEckel.com. See copyright notice in CopyRight.txt.
// Putting test code in a static inner class.

public class TestBed {
TestBed() {}
void f() { System.out.println("f()"); }
public static class Tester {
public static void main(String[] args) {
System.out.println("Tester.main()");
TestBed t = new TestBed();
t.f();
}
}
} ///:~

I'm using java 1.2.2

I'm still getting the following error:

$ java TestBed$Tester
Exception in thread "main" java.lang.NoSuchMethodError: main






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us