Skip to main content
gamedev.net
🔒 Locked

[java] CLASSPATH troubles

Started by deakin Sep 16, 2000 at 5:16 AM 1 replies 900+ views
Original Post
deakin
deakin
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
- DanielMy homepage
SteveMeister
SteveMeister
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

c:\java\com\deakin\stuff

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
I am a Jedi, like my father before me

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.