Hi gang just joined the javaranch. I have read all the posted docs (and many others). I have set paths etc. uninstalled jdk, reinstalled jdk and still I get the error 'NoClassDef Found Error' when I try to compile...why? I am about ready to give up and All I want to do is program at home (it works at college)whats wrong with my computer?
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
posted
0
In the absence of specific information about your problem, I refer you to the Sun Java Tutorial - Getting Started. Try what you finf there and let us know exactly what goes wrong. You'll get help for sure...
please post the stacktrace of your ClassNotFoundException cause there is also the information which class can't be found. did you add all required jar's to your java and javac call ? (via -cp .... ) Is it a web application within a container or a desktop application ? [ September 24, 2003: Message edited by: Oliver Refle ]
Carol Murphy
village idiot
Bartender
Joined: Mar 15, 2001
Posts: 1172
posted
0
Obviously your computer is severely damaged. You should send it to me and I will take it off your hands. Seriously though, if you are getting this message, your class files are not where they can be located. Double check the placement of your class files. Perhaps they aren't where you think they are!
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
10
posted
0
We can help you better if you are more specific. What is your path? What is your classpath? Where is your java.exe file? Where is your MyClass.class file? Do you really get the error when you compile (using javac MyClass.java) or when you try to run the program (using java MyClass)? [ September 24, 2003: Message edited by: Marilyn de Queiroz ]
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Jared Knowlton
Greenhorn
Joined: Sep 20, 2003
Posts: 17
posted
0
I had the same problem and it was answered for me by some kind folks in another forum. Basically make sure when you run the file that you type the java file with the first letter in Caps. For example: javac Mortgage.java java Mortgage If you type java mortgage you'll get the error you are getting. But of course you need to have your path and classpath set correctly as the others have said.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.