All you need to do is add the location of your javac program to the path variable of your computer. That way, you can execute javac from anywhere. Using this method, all you need to do is change to your project folder and execute "javac file.java". To add a location to your path variable, right-click My Computer, select Properties, select the Advanced tab, and select Environment Variables. There should be two path variables: one for your user and one for the system. If you use multiple users, add to the System path variable; otherwise, modify your User path variable. To add a location to the path variable, select path, click Edit, go to the end of the variable value, add a semi-colon (semi-colons seperate locations in the path variable), and add the location you want to add (c:\j2sdk1.4.2_04\bin in your case). After you click OK on all the dialog windows, close any remaining command windows, reopen them, and you now can access the programs in the "c:\j2sdk1.4.2_04\bin" folder from anywhere.
If you don't want to set the path variable, you can always compile by referring to the javac program by it's full name while in your project folder, such as:
c:\j2sdk1.4.2_04\bin\javac hello.java