Trouble compiling code
I began learning Java a few days ago and until now its been a blast. At first, I tried writing my code using notepad and then compiling it using the command prompt in windows. Unfortunately, this method gave me errors. Because of this, I switched to an IDE (integrated development environment) named Eclipse. The application is awesome but I still prefer to learn how to compile using the old-fashion way ;)
Can anyone tell me the proper steps to compiling my code using the command prompt?
P.S.: I've already downloaded the JDK Update 6.
You have to set the class path for working folder. Otherwise you can't compile it.
Here is the simple way to do it.
Say your working folder is D:\JavaTest and the JDK installation folder is C:\Java\jdk1.6.0_05
Open the command prompt and change the working path to D:\JavaTest Then type this,
Then type javac there. You get the possible options with Java, if you do it correctly.
But in this way, each time you start work on Java, have to repeat. If you how to change the AUTOEXEC.BAT file, no need to repeat this.