The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000



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.


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:
// From 'Thinking in Java, 2nd ed.' by Bruce Eckel
// 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) {
TestBed t = new TestBed();
} ///:~

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


Sponsored Links

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