Jump to content

  • Log In with Google      Sign In   
  • Create Account


[java] CLASSPATH troubles


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 deakin   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 September 2000 - 11:16 PM

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

Sponsor:

#2 SteveMeister   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 September 2000 - 03:14 AM

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

#3 deakin   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 September 2000 - 11:47 PM

Thanks! That worked!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS