aspose file tools*
The moose likes Beginning Java and the fly likes Very Common Error But I'm a noob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Very Common Error But I Watch "Very Common Error But I New topic
Author

Very Common Error But I'm a noob

Roan Kaas
Greenhorn

Joined: Jul 23, 2005
Posts: 3
Ok. I have found this error EVERYwhere but I am unable to fix my problem


Ok. I bought this java book. And in the book I'm suppose to download Java. So i do that. Now, I've created a .JAVA file that complies into PARTY.class. Now the java main folder is C:\JAVA. The .Class and the .JAVA file are located in C:\Java2. Now BOTH of those folders and C:\JAVA\Bin are placed in both PATH and CLASSPATH. AS I said it complies but it WILL not run. I get a "Exception in thread "main" java.lang.NoClassDefFoundError: Party/class" error. This may be simple to fix but I'm a noob so PLEASE be patient and give me a step by step. I have become very frusterated with this. If java is this hard to set up how do the Java creators hope to spread popularity of their product?!

Regards,
Roan

[ July 23, 2005: Message edited by: Roan Kaas ]
[ July 23, 2005: Message edited by: Roan Kaas ]
Kristin Stromberg
Ranch Hand

Joined: May 17, 2005
Posts: 91
Make sure you are typing "java Party" to run the file (and not "java Party.class").
[ July 23, 2005: Message edited by: Kristin Stromberg ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
I suggest that you read and do everything specified in this tutorial. It help in 99% of the cases of someone having this problem.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Roan Kaas
Greenhorn

Joined: Jul 23, 2005
Posts: 3
Ok. Thank you for that site. I now only have one problem. When I try to create a normal CLASS file and run it it doesn't work if i've used import.awt.*; or import.awt.event.*;

Yet when I do the same but make it an applet it runs FINE. What am i doing wronge. As i said if those two import's arn't there the command line runs fine
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

So, what error do you get, or what happens? "It doesn't work" doesn't tell us much!


[Jess in Action][AskingGoodQuestions]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

import.awt.*; or import.awt.event.*;


I believe this is a typo. Else, it should be :

import java.awt.*;
import java.awt.event.*;


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Very Common Error But I'm a noob