The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 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:

suggestion....

Posted by amit on December 05, 2000 at 3:42 PM

try changing the file name altogether..

amith.


> Hi,

> I encountered the following exception when tried to
> run my Java program:

> Exception in thread "main" java.lang.NoSuchMethodError: main

> This is my class definition:

> public class MZMZ
> {
> public static void main(String[] args)
> {
> System.out.println("Hello Horse");
> }
> }

>
> To prove my class does contain main mehtod, I run
> "javap MZMZ", here is the outcome:

> Compiled from MZMZ.java
> public class MZMZ extends java.lang.Object{
> public MZMZ();
> public static main(String[] );
> }

> This is some extra information:
> I run this program on Windows NT 4.0 machine on which
> I installed JDK1.2. The directory which contains this
> MZMZ.class is specified in CLASSPATH too.

>
> java gurus, please enlighten me what happened to
> my Java program/JVM? I even plan to reformat my
> harddisk and re-install the OS and JDK.

> Thanks
> --
> Michael






Replies:

Sponsored Links



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