Page 1 of 1

Compile but no run

Posted: Sun Apr 20, 2003 11:13 am
by MattB
I'm running TextPad 4.3.1 and Java SDK/RE 1.4.1.

I can compile code, but when I try to run it as an application I get a "Exception in thread "main" java.lang.NoClassDefFoundError: ModelViewController" error.

This is happening to quite a few people I know in uni.

The class files exist in the correct location. The parameters are $BaseName and the initial folder is $FileDir.

:?:

Posted: Tue Apr 29, 2003 2:10 pm
by mattB
I take that to mean no one has any idea how to fix it. :cry:

Posted: Tue Apr 29, 2003 5:18 pm
by Guest
Add \. to your class path

Posted: Thu May 01, 2003 5:06 am
by Garrett
Actually, it's:

./ ( UNIX )

or

.\ ( Windows )

or just

.

If you add it to the CLASSPATH system variable, it will include the current directory in java's classpath. You don't want to call it explicitly from the command line, as you'll end up having to call all the other .jar files that are in jdk\lib\. Not worth the trouble.