I've been trying to compile my java programs at the MS Dos prompt. I keep getting one of two errors.... "Can't determine application home" and "Exception in thread "main" java.lang.NoClassDefFoundError: c:\Program"
Hi Lorylee the problem is surely in your classpath or just path try this in cmd prompt type set classpath=%classpath%;c:/abc/
where abc is the dir where your compiled java class is located
there is a simpler way to ot and thats something like set classpath=%classpath%;\. i am not too sure if it is \. or /. or just . or somthing in this likes try tese comb and u will get it or someone else who is sure of this will post a msg Cheers
You think you know me .... You will never know me ... You know only what I let you know ... You are just a puppet ... --CMG
Perhaps you had a different version of the jdk installed previously?? According to Roedy Green, you should "Uninstall all Java JDKs and JREs with the control panel. Use Microsoft's RegClean. Tidy up the registry with regedit. Reinstall just the latest JDK."
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
After following Marilyn's advice on reinstalling your Java development and runtime environment, you might still have a problem concerning your CLASSPATH setting. Unless you're regularly using some third party libraries during your development and running of Java applications, I'd suggest that you either don't explicitly specify a CLASSPATH, or set your CLASSPATH to only include the current working directory, specified by a period.
If you've further problems and questions, don't hesitate to ask. It'll possibly also be useful for those trying to help you if you were to post the results of what happens when running the following command.
Hi Lorylee the problem maybe in your classpath or just path i guess your compiler does not know where you put your program 1. make sure u save your files in the "bin" directory i mean for example: "save as" locate where you installed JDK. Typically, on "C drive" then "jdk1.4.1" then "bin" then "save" 2."start" then "run" then type "sysedit" then add: set classpath=%classpath%;c:\jdk1.4.1\bin and then save your work. 3. Test by going to dos prompt and typing "path" you should see your path added......at least that's what i think. N.B always save your programes with extension ".java"