How To Compile Java Using Console in Windows
To compile .java programs first you need to get compiler. Get to download page here and select Download JDK. Then you'll have to select your Operating System. After downloading file you will have to install it and configure system variables. To make a configuration in Windows you have to Right Click on My Computer and select Properties -> Advanced System Settings (in left panel) -> Advanced Tab -> Environment Variables. Search for variable named PATH, if can't find create one and edit variable value to look something like this:
It changes depending on where you have installed it. You have to find "bin" folder, where program "java.exe" and "javac.exe" executable files are. If there was some information already separate them with semicolons and write destinations in quotation-marks.
Now to compile I'd recommend you to put your .java files to "C:/java". Now open console by typing "CMD" in windows search. To open your java files folder write "cd C:/java", to compile it type "javac YourProgram.java" and to see how it works write "java YourProgram".
That's it! If you'd like to ask something feel free to do that in comments below.
How To Compile Pascal
- How To Compile With Notepad++
Notepad++ is just a text editor that has syntax highlighting. I personally love using it, but the drawback is that I sometimes want compile and write code with the same tool. As you know Notepad++ has no...
- How To Compile Pascal Code Using Console (Windows 7)
When I was at school we have been learning Pascal programming language and I faced one problem. Since it was school they didn't introduce us to compiling and other stuff "behind the scenes". We used poorly...
More by this Author
Pascal code compilation on Windows 7 using command prompt.
Notepad++ is just a simple text editor with syntax highlighting. Personally I love it, but the drawback is that sometimes I want to compile and write code with the same tool. As you know Notepad++ has no built-in...