Search This Blog

UI/UX Design | Web Development | Mobile Application Development

Whether you need UI/ UX design, web development services, or mobile app development services, Qaabil Digitals will be more than happy to help you. We work with top software developers, designers, and project managers. We tailor our services to suit your exact needs. We closely look at your company, listen to your story, and bring about the best ideas and solutions that can help you drive solid results. We don’t just produce work that works. We produce work that matters. Get a quote now Or Talk to us

Tuesday 14 June 2011

How can you compile and execute your java program


After you have installed java open your command prompt or simply click at start button and then click run.
A small window will be opened. Write cmd in the text/search box and press run button.

Once you have opened command prompt open the drive/partition in which you have saved your program.
For example i have save my program in "local disk d/my progs". Write "d:" in command prompt and press enter.

After this write the folder name (as in above paragraph d/my progs) and press enter. I will write it as "my progs" and then enter. Now, write your program name and press enter. Just like this:

javac salary.java

there "javac" is the command to compile your program and "salary.java" shows that the programs name is salary and it is a java file.

Finally your program is compiled and ready to execute. When your program will be compiled successfully a class file of the program will be created in the same folder as in your program. To execute your program just write the following command

java salary

and your program will be executed.

Note: 
        "salary" is the program name. You should write the name of your program.

No comments:

Post a Comment

Share