Compile but no run

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
MattB

Compile but no run

Post 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.

:?:
mattB

Post by mattB »

I take that to mean no one has any idea how to fix it. :cry:
Guest

Post by Guest »

Add \. to your class path
Garrett

Post 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.
Post Reply