Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


[java] Java Interpreter error.


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
4 replies to this topic

#1 ARCHIGAMER   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 June 2000 - 10:17 PM

I am doing a sample program from "Teach Yourself Java in 24 Hours" and the programs compile fine but I get an error when I run the interpreter stating: Exeption in Thread "main" java.lang.NoClassDefFoundErrorname of program). What does this mean I don''t know to much about threads and I am new to Java.

Sponsor:

#2 Erik_N   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 June 2000 - 12:24 AM

A number of things can cause this error. I know since I''ve seen it a few times. You might be naming the class a different name then the filename. Or sometimes Java is too stupid to look in the same folder for a class. If you are running your programs from a dos prompt then go to the folder and type
SET CLASSPATH=.
no spaces between classpath & = & . If this is it put this line in your AUTOEXEC.bat to avoid this always. If it''s something else post the code.

#3 ARCHIGAMER   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 June 2000 - 03:31 AM

Ok. It works if I put it into the DOS prompt but what exactly do I put in the autoexec.bat file? A empty set classpath doesn''t do anything I get the same error if I don''t tell the DOS prompt to set classpath.

#4 Erik_N   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 June 2000 - 01:02 AM

path C:/jdk1.2.2/bin
SET CLASSPATH=.

This is what''s in my autoexec. The order can screw you if you have a bunch of stuff in your autoexec, but I''d put it at the top to be safer. I don''t know if you have to but capitolize SET CLASSPATH and no spaces between CLASSPATH=. By the way some systems need this line to compile any java file, some need it automatically access files in the same folder, and some systems don''t need it at all. I have gone through all three stages on my computer am puzzled why this sometimes happens

you could probably writh it like this too
path C:/jdk1.2.2/bin;SET CLASSPATH=.


#5 ARCHIGAMER   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 June 2000 - 04:32 AM

thank you very much




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