The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001



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.


Newbie - Java compilation error

Posted by greg on July 26, 2001 at 9:16 PM

I am an experienced programmer that has worked on several java projects. Even though I have worked with the Java language, I have worked using it at a summarized "tool" level.

I am in the process of learning the "nuts & bolts" of the language so that I may undestand the underlying commands and programming concepts.

windows nt system 4.0

when running (java) the testclass,an exception is thrown.

Please help ... I need to know what I am doing incorrect...
(please reference info below)

file layout:
class file: e:/dev/proj/classes/expertplan/misc/testmain.class
srce file: e:/dev/proj/source/expertplan/misc/

dos command:
e:dev/proj>java -cp classes classes/expertplan/misc/testmain

error message:
exception in thread "main" java.lang.noclassdeffounderror - classes/expertplan/misc/testmain

*========= class source ========*
package expertplan.misc;

// import packages

// class meta data

// class definition
public class TestMain
//public properties
//private properties
public static void main(String[] arg)
System.out.println("hello world");

public TestMain(){};
//public methods
//private methods
* ==================================*


Sponsored Links

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