Compile and run a Java application in Windows CMD – Tutorial for dummies

AD94

Image

In this tutorial I’ll explain how to compile and run a Java application in Windows’ command prompt (CMD).

First off, you have to add a system path in Windows. Open Control Panel and select System. Then select Advanced system settings.

Image

At the next window, click Environment Variables:

Image

Next, under System variables, find the variable named « Path ».

Image

Double-click the variable « Path ». At the end of the default path add a « ; » if there’s not one already.

Image

Now we need to find where our JDK and its bin folder are located. In my case, that’s « C:Program FilesJavajdk1.8.0_05bin ». Now you should add that path after the « ; ». Here’s what it should look like after you’ve done that:

Image

If you’ve done everything correctly, you should now be able to compile .java files via CMD. Let’s try that out!

1. Run CMD. In Windows 7, you simply open the Start…

View original post 129 mots de plus

Publicités
Par défaut