• Advertisement


This topic is now archived and is closed to further replies.

[java] CLASSPATH troubles

This topic is 6333 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have tried setting my class path variable using "set CLASSPATH=c:\java" at the MS-DOS prompt where "c:\java" is the path to all my class files/packages, but I still get the error: Exception in thread "main" java.lang.NoClassDefFoundError: TraderWindow Whenever I try to use "java TraderWindow". The annoying thing is that this used to work fine, but has suddenly started to not work. Does anyone know what would cause this? Is there something I am missing? Thanks, - Daniel VG Games

Share this post

Link to post
Share on other sites
Two things to try.

First, qualify your class name when you run it. If your TraderWindow is in the package com.deakin.stuff, type

java com.deakin.stuff.TraderWindow

Make sure TraderWindow.class is in the directory


If TraderWindow is not in a package, add "." to your classpath:

set classpath=c:\java\;.

Then change into the directory where TraderWindow is and run it:

cd c:\trader_windows_directory
java TraderWindow

Edited by - SteveMeister on September 21, 2000 8:52:29 AM

Share this post

Link to post
Share on other sites

  • Advertisement