Are you new to programming? Don’t know what to when you get those stupid javac errors? Are you one of those who go…
“OMG! I want it to work!!! When Ii run this file it gets exception in thread "main" javac.lang.noclassdeffonderror. Do you know what I can do? Help pl0z?”Well then, now you can fix it by yourself, using this guide of course!
I. Downloading JDK Files: If you already have JDK installed in your computer, then skip step #1 and it’s subsections.
1. Goto:
https://sdlcweb4a.sun.com/ECom/EComActionSe...81CD64F367DF9E0 2. Accept, then download the offline installation and install it in your computer.
II. Modifying Options1. Now after you have installed it go to Start > Search and search for:
Javac
It will come up with something like this:

2. Then you click on properties you'll see "location". Now copy that location like this:
3. Then go to Start > Control Panel > System, then double click Systems and you will get a window opened.
4. On that window you need to click on the Advanced tab. At the bottom of that tab will be a button called Environment Variables, click on it.
5. Now you will see something like below:

6. Click on New button under the 1st box. And now you need to make something called ‘PATH’. Set it up like this:
Variable Name: {Type PATH}
Variable Value: {click inside and press ‘Ctrl + V’ or simply paste the location of your Javac}
…and press OK to close the new box that you just created.
7. Next, you have to edit the "Path" in the System Variables (or box #2) so find "Path" in the bottom box and then click the Edit button.
8. Click on Variable Value box and press the "End" key on your keyboard...then type a semicolon (";") and then press "Ctrl + V" on your keyboard (or paste the path again).
Note: Make sure you don’t put a space between the semicolon and the ‘pasted’ text...NO SPACES!)

…and press OK to close the edited box.
9. Now go to the same second box called System Variables (or box #2), but this time we are going to click the New button and enter the following data
Variable Name: {Type CLASSPATH}
Variable Value: {click inside and just type in a ‘Period’ or ‘.’}

…and press OK to close the new box that you just created.
Press OK on other boxes that are open, and close them.